From f38cacd513fab59a625a9a19e0725e41f7e6f545 Mon Sep 17 00:00:00 2001 From: Arksine Date: Sun, 21 Mar 2021 14:43:28 -0400 Subject: [PATCH] history: fix "/server/history/list" when no jobs are present Return an empty list instead of an empty object. Signed-off-by: Eric Callahan --- moonraker/components/history.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/moonraker/components/history.py b/moonraker/components/history.py index 91b9829..515f298 100644 --- a/moonraker/components/history.py +++ b/moonraker/components/history.py @@ -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]