From 222878894e1f0f79a60b82ae31bc647276cc9b89 Mon Sep 17 00:00:00 2001 From: Nathan Freeman Date: Fri, 16 Aug 2024 10:25:24 -0500 Subject: [PATCH] Serialize task output on task create --- src/api/src/backend/services/TaskService.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/api/src/backend/services/TaskService.py b/src/api/src/backend/services/TaskService.py index 6758b212..00fc15d6 100644 --- a/src/api/src/backend/services/TaskService.py +++ b/src/api/src/backend/services/TaskService.py @@ -73,11 +73,15 @@ def create(self, pipeline, request): self.rollback() raise e - # Convert the input to jsonserializable + # Convert the input and output to jsonserializable _input = {} for key in request.input: _input[key] = request.input[key].dict() + output = {} + for key in request.output: + output[key] = request.output[key].dict() + # Prepare the uses property uses = getattr(request, "uses", None) if uses != None: @@ -111,7 +115,7 @@ def create(self, pipeline, request): input=_input, installer=getattr(request, "installer", None), id=request.id, - output=request.output, + output=output, packages=getattr(request, "packages", None), pipeline=pipeline, poll=getattr(request, "poll", None),