mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-19 14:48:59 +00:00
Merge pull request #1204 from bookwyrm-social/dev-import-bug
Avoids template errors in dev when imports can't connect to redis
This commit is contained in:
commit
088c862e90
1 changed files with 3 additions and 1 deletions
|
@ -84,7 +84,9 @@ class ImportStatus(View):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
task = app.AsyncResult(job.task_id)
|
task = app.AsyncResult(job.task_id)
|
||||||
except ValueError:
|
# triggers attribute error if the task won't load
|
||||||
|
task.status # pylint: disable=pointless-statement
|
||||||
|
except (ValueError, AttributeError):
|
||||||
task = None
|
task = None
|
||||||
|
|
||||||
items = job.items.order_by("index").all()
|
items = job.items.order_by("index").all()
|
||||||
|
|
Loading…
Reference in a new issue