From 08f4ad6cd47e1804c95259c19397c297e9857a19 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Sat, 13 Nov 2021 09:02:42 -0800 Subject: [PATCH] Fixes call to import task --- bookwyrm/importers/importer.py | 4 ++-- bookwyrm/tests/importers/test_importer.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bookwyrm/importers/importer.py b/bookwyrm/importers/importer.py index 6d0f6553..4908e166 100644 --- a/bookwyrm/importers/importer.py +++ b/bookwyrm/importers/importer.py @@ -101,9 +101,9 @@ class Importer: self.create_item(job, item.index, item.data) return job - def start_import(self, job): + def start_import(self, job): # pylint: disable=no-self-use """initalizes a csv import job""" - result = start_import_task.delay(self.service, job.id) + result = start_import_task.delay(job.id) job.task_id = result.id job.save() diff --git a/bookwyrm/tests/importers/test_importer.py b/bookwyrm/tests/importers/test_importer.py index 963eca54..b0863fbe 100644 --- a/bookwyrm/tests/importers/test_importer.py +++ b/bookwyrm/tests/importers/test_importer.py @@ -120,7 +120,7 @@ class GenericImporter(TestCase): ) with patch("bookwyrm.importers.importer.import_item_task.delay") as mock: - start_import_task(self.importer.service, import_job.id) + start_import_task(import_job.id) self.assertEqual(mock.call_count, 4)