Skip to content

Commit

Permalink
Fix filtering condition for AWS DocumentDB compatibility
Browse files Browse the repository at this point in the history
Signed-off-by: DongYoung Kim <[email protected]>
  • Loading branch information
kwx4957 committed Sep 29, 2024
1 parent 839c3a3 commit 1169a34
Showing 1 changed file with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1305,14 +1305,22 @@ func (c *ChaosExperimentRunHandler) ChaosExperimentRunEvent(event model.Experime
} else if experimentRunCount > 0 {
filter := bson.D{
{"experiment_id", event.ExperimentID},
{"recent_experiment_run_details.experiment_run_id", event.ExperimentRunID},
{"recent_experiment_run_details.completed", false},
{"recent_experiment_run_details", bson.D{
{"$elemMatch", bson.D{
{"experiment_run_id", event.ExperimentRunID},
{"completed", false},
}},
}},
}
if event.NotifyID != nil {
filter = bson.D{
{"experiment_id", event.ExperimentID},
{"recent_experiment_run_details.completed", false},
{"recent_experiment_run_details.notify_id", event.NotifyID},
{"recent_experiment_run_details", bson.D{
{"$elemMatch", bson.D{
{"notify_id", event.NotifyID},
{"completed", false},
}},
}},
}
}
updatedByModel := mongodb.UserDetailResponse{
Expand Down

0 comments on commit 1169a34

Please sign in to comment.