From 67ac2f4bbd33c25a89bc19998b0befcf9999b1ea Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Wed, 11 Sep 2019 19:52:54 +0200 Subject: Make archive import/export tasks serializable for Celery tasks --- ishtar_common/admin.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ishtar_common/admin.py') diff --git a/ishtar_common/admin.py b/ishtar_common/admin.py index bd068890e..98f7c2663 100644 --- a/ishtar_common/admin.py +++ b/ishtar_common/admin.py @@ -1428,8 +1428,8 @@ def launch_export_action(modeladmin, request, queryset): export_task.save() if not settings.USE_BACKGROUND_TASK: - return launch_export(export_task) - return launch_export.delay(export_task) + return launch_export(export_task.pk) + return launch_export.delay(export_task.pk) launch_export_action.short_description = _("Launch export") @@ -1474,8 +1474,8 @@ def launch_import_action(modeladmin, request, queryset): import_task.save() if not settings.USE_BACKGROUND_TASK: - return launch_import(import_task) - return launch_import.delay(import_task) + return launch_import(import_task.pk) + return launch_import.delay(import_task.pk) launch_import_action.short_description = _("Launch import") -- cgit v1.2.3