2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-15 19:45:46 +00:00
check if self.object.owner is None
This commit is contained in:
Oliver Walters
2021-03-03 21:52:02 +11:00
parent fb5d7c415b
commit a9e3e46b8a

View File

@ -186,7 +186,7 @@ class StockLocationEdit(AjaxUpdateView):
# Is ownership control enabled?
stock_ownership_control = InvenTreeSetting.get_setting('STOCK_OWNERSHIP_CONTROL')
if stock_ownership_control:
if stock_ownership_control and self.object.owner:
# Get authorized users
authorized_owners = self.object.owner.get_related_owners()