mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-30 04:26:44 +00:00
This commit is contained in:
parent
d7f05cdcb7
commit
43355904b0
@ -225,10 +225,10 @@ class SupplierBarcodeMixin(BarcodeMixin):
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
if supplier_pk := self.get_setting("SUPPLIER_ID"):
|
if supplier_pk := self.get_setting("SUPPLIER_ID"):
|
||||||
if (supplier := Company.objects.get(pk=supplier_pk)):
|
try:
|
||||||
return supplier
|
return Company.objects.get(pk=supplier_pk)
|
||||||
else:
|
except Company.DoesNotExist:
|
||||||
logger.error(
|
logger.exception(
|
||||||
"No company with pk %d (set \"SUPPLIER_ID\" setting to a valid value)",
|
"No company with pk %d (set \"SUPPLIER_ID\" setting to a valid value)",
|
||||||
supplier_pk
|
supplier_pk
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user