mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
PEP style fixes
This commit is contained in:
parent
7c26d8f71d
commit
65e4ee5793
@ -74,8 +74,8 @@ class StockLocation(InvenTreeTree):
|
||||
if loc.owner is not None:
|
||||
return loc.owner
|
||||
|
||||
return None
|
||||
|
||||
return None
|
||||
|
||||
def check_ownership(self, user):
|
||||
"""
|
||||
Check if the user "owns" (is one of the owners of) the location.
|
||||
@ -97,7 +97,7 @@ class StockLocation(InvenTreeTree):
|
||||
# No owner set, for this location or any location above
|
||||
# So, no ownership checks to perform!
|
||||
return True
|
||||
|
||||
|
||||
return user in owner.get_related_owners(include_group=True)
|
||||
|
||||
def get_absolute_url(self):
|
||||
|
@ -82,7 +82,7 @@ class StockLocationDetail(InvenTreeRoleMixin, DetailView):
|
||||
model = StockLocation
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
|
||||
|
||||
context = super().get_context_data(**kwargs)
|
||||
|
||||
context['ownership_enabled'] = common.models.InvenTreeSetting.get_setting('STOCK_OWNERSHIP_CONTROL')
|
||||
|
Loading…
Reference in New Issue
Block a user