Skip to content

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

Fix the bug that instance username/password won't be updated if the instance patch contains to update other info

天舟26b2c8034a0d
diff --git a/server/instance.go b/server/instance.go
index c8bfc5a4a3..78a1fd2814 100644
--- a/server/instance.go
+++ b/server/instance.go
@@ -112,7 +112,9 @@ func (s *Server) registerInstanceRoutes(g *echo.Group) {
}
return echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("Failed to patch instance ID: %v", id)).SetInternal(err)
}
- } else if instancePatch.Username != nil || instancePatch.Password != nil {
+ }
+
+ if instancePatch.Username != nil || instancePatch.Password != nil {
instanceFind := &api.InstanceFind{
ID: &id,
}