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
35fbb910e8
commit
6c0661a6f2
@ -149,7 +149,7 @@ class LocatePluginView(APIView):
|
||||
raise ParseError(f"Plugin '{plugin}' is not installed, or does not support the location mixin")
|
||||
|
||||
# StockItem to identify
|
||||
item_pk= request.data.get('item', None)
|
||||
item_pk = request.data.get('item', None)
|
||||
|
||||
# StockLocation to identify
|
||||
location_pk = request.data.get('location', None)
|
||||
@ -165,7 +165,7 @@ class LocatePluginView(APIView):
|
||||
# StockItem takes priority
|
||||
if item_pk:
|
||||
try:
|
||||
item = StockItem.objects.get(pk=item_pk)
|
||||
StockItem.objects.get(pk=item_pk)
|
||||
|
||||
offload_task('plugin.registry.call_function', plugin, 'locate_stock_item', item_pk)
|
||||
|
||||
@ -178,7 +178,7 @@ class LocatePluginView(APIView):
|
||||
|
||||
elif location_pk:
|
||||
try:
|
||||
location = StockLocation.objects.get(pk=location_pk)
|
||||
StockLocation.objects.get(pk=location_pk)
|
||||
|
||||
offload_task('plugin.registry.call_function', plugin, 'locate_stock_location', location_pk)
|
||||
|
||||
|
@ -44,6 +44,7 @@ def mixin_enabled(plugin, key, *args, **kwargs):
|
||||
"""
|
||||
return plugin.mixin_enabled(key)
|
||||
|
||||
|
||||
@register.simple_tag()
|
||||
def mixin_available(mixin, *args, **kwargs):
|
||||
"""
|
||||
@ -51,6 +52,7 @@ def mixin_available(mixin, *args, **kwargs):
|
||||
"""
|
||||
return len(registry.with_mixin(mixin)) > 0
|
||||
|
||||
|
||||
@register.simple_tag()
|
||||
def navigation_enabled(*args, **kwargs):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user