From 54a6c010053e0c6446e2063db9fb3690828f998f Mon Sep 17 00:00:00 2001 From: Ben Buchacher Date: Thu, 10 Oct 2013 16:06:29 -0700 Subject: [PATCH] Fix - Custom objects cannot be serialized in JSON Custom objects cannot be serialized in JSON, convert tasks into list before serializing. --- lib/utils/api.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/utils/api.py b/lib/utils/api.py index d9b049080..d62f62a24 100644 --- a/lib/utils/api.py +++ b/lib/utils/api.py @@ -340,7 +340,8 @@ def task_list(taskid): """ if is_admin(taskid): logger.debug("Listed task pull") - return jsonize({"tasks": tasks, "tasks_num": len(tasks)}) + task_list = list(tasks) + return jsonize({"tasks": task_list, "tasks_num": len(tasks)}) else: abort(401)