From 4e40d92db792be36ab0b7aebd02725c1cc090e30 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Sat, 25 Apr 2020 13:31:42 +1000 Subject: [PATCH] PEP fix --- InvenTree/order/models.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/InvenTree/order/models.py b/InvenTree/order/models.py index 647c5c49ec..7e56858126 100644 --- a/InvenTree/order/models.py +++ b/InvenTree/order/models.py @@ -315,7 +315,6 @@ class SalesOrder(Order): def ship_order(self, user): """ Mark this order as 'shipped' """ - # The order can only be 'shipped' if the current status is PENDING if not self.status == SalesOrderStatus.PENDING: raise ValidationError({'status': _("SalesOrder cannot be shipped as it is not currently pending")}) @@ -323,7 +322,7 @@ class SalesOrder(Order): # Complete the allocation for each allocated StockItem for line in self.lines.all(): for allocation in line.allocations.all(): - allocation.complete_allocation(user) + allocation.complete_allocation(user) # Ensure the order status is marked as "Shipped" self.status = SalesOrderStatus.SHIPPED