mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 19:17:32 +00:00
fix: add RollbackUnlessCommitted for gorm transactions (#7197)
This commit is contained in:
@@ -57,6 +57,7 @@ func PrepareSearchQuery(table string, request SearchRequest) func(db *gorm.DB, r
|
||||
if err := query.Commit().Error; err != nil {
|
||||
logging.OnError(err).Info("commit failed")
|
||||
}
|
||||
query.RollbackUnlessCommitted()
|
||||
}()
|
||||
|
||||
query = query.Count(&count)
|
||||
|
Reference in New Issue
Block a user