Avoid integrity error in middleware
Created by: das-g
Sub-PR of #461 for fixing a bug found in review (Therefore connected to #438 (closed))
Reviewed by
-
@hixi
Created by: das-g
Sub-PR of #461 for fixing a bug found in review (Therefore connected to #438 (closed))