history: fix "/server/history/list" when no jobs are present

Return an empty list instead of an empty object.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Arksine 2021-03-21 14:43:28 -04:00
parent c48fe983de
commit f38cacd513
1 changed files with 1 additions and 1 deletions

View File

@ -84,7 +84,7 @@ class History:
limit = web_request.get_int("limit", 50)
start = web_request.get_int("start", 0)
if start >= end_num or end_num == 0:
return {"count": 0, "jobs": {}}
return {"count": 0, "jobs": []}
for job_id in self.cached_job_ids:
job = self.history_ns[job_id]