From 890ce9ef956fa132eceab737fbf24d66f94e2133 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Thu, 14 Jan 2021 10:58:29 +1100 Subject: [PATCH] Fix IPN comparison against null value --- InvenTree/part/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/InvenTree/part/views.py b/InvenTree/part/views.py index 0e16bfb498..26cf93e56d 100644 --- a/InvenTree/part/views.py +++ b/InvenTree/part/views.py @@ -1320,7 +1320,7 @@ class BomUpload(InvenTreeRoleMixin, FormView): # Otherwise, check to see if there is a matching IPN try: if row['part_ipn']: - part_matches = [part for part in self.allowed_parts if row['part_ipn'].lower() == part.IPN.lower()] + part_matches = [part for part in self.allowed_parts if part.IPN and row['part_ipn'].lower() == str(part.IPN.lower())] # Check for single match if len(part_matches) == 1: