mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Bug fix
check if self.object.owner is None
This commit is contained in:
parent
fb5d7c415b
commit
a9e3e46b8a
@ -186,7 +186,7 @@ class StockLocationEdit(AjaxUpdateView):
|
|||||||
# Is ownership control enabled?
|
# Is ownership control enabled?
|
||||||
stock_ownership_control = InvenTreeSetting.get_setting('STOCK_OWNERSHIP_CONTROL')
|
stock_ownership_control = InvenTreeSetting.get_setting('STOCK_OWNERSHIP_CONTROL')
|
||||||
|
|
||||||
if stock_ownership_control:
|
if stock_ownership_control and self.object.owner:
|
||||||
# Get authorized users
|
# Get authorized users
|
||||||
authorized_owners = self.object.owner.get_related_owners()
|
authorized_owners = self.object.owner.get_related_owners()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user