Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

fix: update user (#15215)

boojack89e5a20f3231
diff --git a/backend/store/principal.go b/backend/store/principal.go
index ba50ab2b12..0f01132bfe 100644
--- a/backend/store/principal.go
+++ b/backend/store/principal.go
@@ -337,6 +337,10 @@ func (s *Store) UpdateUser(ctx context.Context, currentUser *UserMessage, patch
}
principalArgs = append(principalArgs, currentUser.ID)
+ if len(principalSet) == 0 {
+ return currentUser, nil
+ }
+
tx, err := s.db.BeginTx(ctx, nil)
if err != nil {
return nil, err