diff --git a/bookwyrm/models/import_job.py b/bookwyrm/models/import_job.py index d8cfad314..6aef7c1a7 100644 --- a/bookwyrm/models/import_job.py +++ b/bookwyrm/models/import_job.py @@ -74,8 +74,7 @@ class ImportJob(models.Model): task = start_import_task.delay(self.id) self.task_id = task.id - self.status = "active" - self.save(update_fields=["status", "task_id"]) + self.save(update_fields=["task_id"]) def complete_job(self): """Report that the job has completed""" @@ -332,6 +331,8 @@ class ImportItem(models.Model): def start_import_task(job_id): """trigger the child tasks for each row""" job = ImportJob.objects.get(id=job_id) + job.status = "active" + job.save(update_fields=["status"]) # don't start the job if it was stopped from the UI if job.complete: return diff --git a/bookwyrm/templates/import/import_status.html b/bookwyrm/templates/import/import_status.html index 757ed49a9..02bd1fdf0 100644 --- a/bookwyrm/templates/import/import_status.html +++ b/bookwyrm/templates/import/import_status.html @@ -41,7 +41,7 @@ - {% if not job.complete and show_progress %} + {% if job.status == "active" and show_progress %}