From a7728d31ab13f41d28f086655fcff8c68d437eed Mon Sep 17 00:00:00 2001 From: Oliver Date: Thu, 30 Nov 2023 16:31:07 +1100 Subject: [PATCH] Check for null part instance (#6011) - Error reported via sentry.io --- InvenTree/order/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/InvenTree/order/views.py b/InvenTree/order/views.py index 8895c134ba..4130a06eaa 100644 --- a/InvenTree/order/views.py +++ b/InvenTree/order/views.py @@ -342,8 +342,9 @@ class LineItemPricing(PartPricing): else: return None - if id: + if part and id: return part.id + return part def get_so(self, pk=False):