fix: warehouse filter query by chaining conditions

(cherry picked from commit 7a266113ed)
This commit is contained in:
Karm Soni
2025-07-15 15:15:31 +05:30
committed by Mergify
parent 1d52a8fb69
commit b57163b7be

View File

@@ -269,7 +269,7 @@ def apply_warehouse_filter(query, sle, filters):
for condition in range_conditions[1:]:
combined_condition = combined_condition | condition
child_query = child_query.where(combined_condition & (warehouse_table.name == sle.warehouse))
child_query = child_query.where(combined_condition).where(warehouse_table.name == sle.warehouse)
query = query.where(ExistsCriterion(child_query))