From fb55f5d2a2e0a243547a7a7d72002bd8fac24e90 Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 17 May 2022 01:32:08 +0200 Subject: [PATCH] convert remaining function --- InvenTree/plugin/base/event/events.py | 4 ++-- InvenTree/plugin/base/locate/api.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/InvenTree/plugin/base/event/events.py b/InvenTree/plugin/base/event/events.py index 4b9c44521d..4dea7525b3 100644 --- a/InvenTree/plugin/base/event/events.py +++ b/InvenTree/plugin/base/event/events.py @@ -37,7 +37,7 @@ def trigger_event(event, *args, **kwargs): logger.debug(f"Event triggered: '{event}'") offload_task( - 'plugin.events.register_event', + register_event, event, *args, **kwargs @@ -72,7 +72,7 @@ def register_event(event, *args, **kwargs): # Offload a separate task for each plugin offload_task( - 'plugin.events.process_event', + process_event, slug, event, *args, diff --git a/InvenTree/plugin/base/locate/api.py b/InvenTree/plugin/base/locate/api.py index 30c6d749a9..020951b283 100644 --- a/InvenTree/plugin/base/locate/api.py +++ b/InvenTree/plugin/base/locate/api.py @@ -56,7 +56,7 @@ class LocatePluginView(APIView): try: 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 @@ -69,7 +69,7 @@ class LocatePluginView(APIView): try: 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