Skip to content

Commit

Permalink
fix: set empty result by default
Browse files Browse the repository at this point in the history
  • Loading branch information
artaasadi committed Dec 27, 2024
1 parent 894309d commit 9fb71c2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions services/tasks/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ func (r *httpRoutes) runTask(ctx echo.Context) error {
r.logger.Error("failed to set params", zap.Error(err))
return echo.NewHTTPError(http.StatusInternalServerError, "failed to set params")
}
err = run.Result.Set([]byte(""))
if err != nil {
r.logger.Error("failed to set results", zap.Error(err))
return echo.NewHTTPError(http.StatusInternalServerError, "failed to set results")
}

if err := r.db.CreateTaskRun(&run); err != nil {
r.logger.Error("failed to create task run", zap.Error(err))
Expand Down

0 comments on commit 9fb71c2

Please sign in to comment.