Discounts: Fix scoping error with distinct subevents

This commit is contained in:
Raphael Michel
2023-11-29 16:02:27 +01:00
parent 66f934bba7
commit b92feb382b
2 changed files with 31 additions and 1 deletions

View File

@@ -424,5 +424,10 @@ class Discount(LoggedModel):
break
for g in candidate_groups:
self._apply_min_count(positions, g, g, result)
self._apply_min_count(
positions,
[idx for idx in g if idx in condition_candidates],
[idx for idx in g if idx in benefit_candidates],
result
)
return result