Fix sublocation counter for deleted locations [SCI-11101]

This commit is contained in:
Anton 2024-09-26 14:21:22 +02:00
parent 96835a171e
commit b43ce7c73f

View file

@ -20,7 +20,7 @@ module Lists
@records =
StorageLocation.joins('LEFT JOIN storage_locations AS sub_locations ' \
'ON storage_locations.id = sub_locations.parent_id')
'ON storage_locations.id = sub_locations.parent_id AND sub_locations.discarded_at IS NULL')
.left_joins(:team, :created_by)
.select(shared_sql_select)
.select(