Commit a9e69782 authored by Vermaat's avatar Vermaat
Browse files

Fix crash listing zero batch jobs in admin

parent afa9ded0
......@@ -176,6 +176,9 @@ def list_batch_jobs():
).label('count')
).order_by(BatchJob.added.asc()).all()
if len(batch_jobs_with_counts) < 1:
return
lengths = {
'id_len': max(len(str(j.id)) for j, _ in batch_jobs_with_counts),
'type_len': max(len(j.job_type) for j, _ in batch_jobs_with_counts),
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment