Skip to content

Commit 9c1e63c

Browse files
authored
Merge pull request #348 from bruecksen/342-ingredients-list-shows-ingredients-of-canceled-production-plans
Exclude canceled plans from ingredients list
2 parents 9f3b049 + e310203 commit 9c1e63c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bakeup/shop/models.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ def create_template_orders(self, request):
200200

201201
def get_ingredient_summary_list(self):
202202
ingredients = {}
203-
for production_plan in self.production_plans.filter(parent_plan__isnull=True):
203+
for production_plan in self.production_plans.filter(parent_plan__isnull=True).exclude(state=ProductionPlan.State.CANCELED):
204204
for child in ProductionPlan.objects.filter(
205205
Q(parent_plan=production_plan) |
206206
Q(parent_plan__parent_plan=production_plan) |

0 commit comments

Comments
 (0)