Skip to content

Commit

Permalink
fix: set empty reports on Execution update (#5947)
Browse files Browse the repository at this point in the history
  • Loading branch information
rangoo94 authored Oct 18, 2024
1 parent 86382dc commit 5db5371
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/repository/testworkflow/mongo.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,9 @@ func (r *MongoRepository) Insert(ctx context.Context, result testkube.TestWorkfl

func (r *MongoRepository) Update(ctx context.Context, result testkube.TestWorkflowExecution) (err error) {
result.EscapeDots()
if result.Reports == nil {
result.Reports = []testkube.TestWorkflowReport{}
}
_, err = r.Coll.ReplaceOne(ctx, bson.M{"id": result.Id}, result)
return
}
Expand Down

0 comments on commit 5db5371

Please sign in to comment.