Skip to content

Commit

Permalink
Merge pull request #9 from rarimo/fix/event_types_update
Browse files Browse the repository at this point in the history
Add filter in update event
  • Loading branch information
Zaptoss authored Jul 10, 2024
2 parents 2004d24 + 744f208 commit ee53d05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/service/handlers/update_event_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func UpdateEventType(w http.ResponseWriter, r *http.Request) {
}

typeModel := models.ResourceToModel(req.Data.Attributes)
res, err := EventTypesQ(r).Update(typeModel.ForUpdate())
res, err := EventTypesQ(r).FilterByNames(typeModel.Name).Update(typeModel.ForUpdate())
if err != nil {
Log(r).WithError(err).Error("Failed to update event type")
ape.RenderErr(w, problems.InternalError())
Expand Down

0 comments on commit ee53d05

Please sign in to comment.