mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-18 14:16:45 +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:
|
||||
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
|
||||
|
||||
items = job.items.order_by("index").all()
|
||||
|
|
Loading…
Reference in a new issue