mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-24 00:50:35 +00:00
Avoids template errors in dev when imports can't connect to redis
This commit is contained in:
parent
290192204e
commit
e13ddb10d0
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