Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Improve checking the shipment ability per delivery group (fix case when there is no payment)

Marcin Gębala7f4214d79a47
diff --git a/saleor/dashboard/order/views.py b/saleor/dashboard/order/views.py
index 951fe52cdf..d5745e34b4 100644
--- a/saleor/dashboard/order/views.py
+++ b/saleor/dashboard/order/views.py
@@ -67,7 +67,7 @@ class OrderDetails(StaffMemberOnlyMixin, DetailView):
groups = self.object.groups.select_subclasses().all()
for group in groups:
- group.can_ship = payment.status == 'confirmed' and \
+ group.can_ship = payment and payment.status == 'confirmed' and \
group.status == 'new'
ctx['delivery_groups'] = groups
return ctx