2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-15 03:25:42 +00:00

Merge pull request #1387 from SchrodingersGat/null-fix

Bug fix
This commit is contained in:
Oliver
2021-03-03 22:16:12 +11:00
committed by GitHub

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()