From 65e4ee5793563d0f451b9c9ac6e37ec21e010bee Mon Sep 17 00:00:00 2001 From: Oliver Date: Fri, 25 Feb 2022 23:01:02 +1100 Subject: [PATCH] PEP style fixes --- InvenTree/stock/models.py | 6 +++--- InvenTree/stock/views.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/InvenTree/stock/models.py b/InvenTree/stock/models.py index a3b7383ee8..64b47da6d3 100644 --- a/InvenTree/stock/models.py +++ b/InvenTree/stock/models.py @@ -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): diff --git a/InvenTree/stock/views.py b/InvenTree/stock/views.py index d263a498de..d1fde25b0a 100644 --- a/InvenTree/stock/views.py +++ b/InvenTree/stock/views.py @@ -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')