Fix - Custom objects cannot be serialized in JSON

Custom objects cannot be serialized in JSON, convert tasks into list before serializing.
This commit is contained in:
Ben Buchacher 2013-10-10 16:06:29 -07:00
parent 4c39235c2f
commit 54a6c01005

View File

@ -340,7 +340,8 @@ def task_list(taskid):
""" """
if is_admin(taskid): if is_admin(taskid):
logger.debug("Listed task pull") 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: else:
abort(401) abort(401)