<!--- Provide a general summary of the issue in the Title above --> Some of the database logic is not wrapped into a transaction in crud.go, for example, https://github.com/checkr/flagr/blob/848bcf07b8ff4f6a4a056794d521c62535b2e3b8/pkg/handler/crud.go#L424 ## Expected Behavior Ideally, all the database logic of a request can be wrapped into a transaction to avoid data corruption. ## Current Behavior <!--- If describing a bug, tell us what happens instead of the expected behavior --> <!--- If suggesting a change/improvement, explain the difference from current behavior --> ## Possible Solution Use `db.Transaction(func(tx *gorm.DB) error {` https://gorm.io/docs/transactions.html#Transactions