Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Test statuses set instead of list of booleans
Artur Smęt0c1b58f7f7ac
diff --git a/saleor/dashboard/order/forms.py b/saleor/dashboard/order/forms.pyindex c79b2dd15f..acc714e56d 100644--- a/saleor/dashboard/order/forms.py+++ b/saleor/dashboard/order/forms.py@@ -210,8 +210,8 @@ class CancelGroupForm(forms.Form):self.delivery_group.status = Status.CANCELLEDself.delivery_group.save()other_groups = self.delivery_group.order.groups.all()- statuses = other_groups.values_list('status', flat=True)- if all(status == Status.CANCELLED for status in statuses):+ statuses = set(other_groups.values_list('status', flat=True))+ if statuses == {Status.CANCELLED}:# Cancel whole orderself.delivery_group.order.status = Status.CANCELLEDself.delivery_group.order.save(update_fields=['status'])