mirror of
https://github.com/inventree/InvenTree.git
synced 2025-05-12 02:02:59 +00:00
convert remaining function
This commit is contained in:
parent
728cccc469
commit
fb55f5d2a2
@ -37,7 +37,7 @@ def trigger_event(event, *args, **kwargs):
|
|||||||
logger.debug(f"Event triggered: '{event}'")
|
logger.debug(f"Event triggered: '{event}'")
|
||||||
|
|
||||||
offload_task(
|
offload_task(
|
||||||
'plugin.events.register_event',
|
register_event,
|
||||||
event,
|
event,
|
||||||
*args,
|
*args,
|
||||||
**kwargs
|
**kwargs
|
||||||
@ -72,7 +72,7 @@ def register_event(event, *args, **kwargs):
|
|||||||
|
|
||||||
# Offload a separate task for each plugin
|
# Offload a separate task for each plugin
|
||||||
offload_task(
|
offload_task(
|
||||||
'plugin.events.process_event',
|
process_event,
|
||||||
slug,
|
slug,
|
||||||
event,
|
event,
|
||||||
*args,
|
*args,
|
||||||
|
@ -56,7 +56,7 @@ class LocatePluginView(APIView):
|
|||||||
try:
|
try:
|
||||||
StockItem.objects.get(pk=item_pk)
|
StockItem.objects.get(pk=item_pk)
|
||||||
|
|
||||||
offload_task('plugin.registry.call_function', plugin, 'locate_stock_item', item_pk)
|
offload_task(registry.call_function, plugin, 'locate_stock_item', item_pk)
|
||||||
|
|
||||||
data['item'] = item_pk
|
data['item'] = item_pk
|
||||||
|
|
||||||
@ -69,7 +69,7 @@ class LocatePluginView(APIView):
|
|||||||
try:
|
try:
|
||||||
StockLocation.objects.get(pk=location_pk)
|
StockLocation.objects.get(pk=location_pk)
|
||||||
|
|
||||||
offload_task('plugin.registry.call_function', plugin, 'locate_stock_location', location_pk)
|
offload_task(registry.call_function, plugin, 'locate_stock_location', location_pk)
|
||||||
|
|
||||||
data['location'] = location_pk
|
data['location'] = location_pk
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user