Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
fix: should able to archive the environment when there is no active instance in that environment (#1756)
tianzhou0851543058ea
diff --git a/server/environment.go b/server/environment.goindex 97378a39fc..964c36fa3d 100644--- a/server/environment.go+++ b/server/environment.go@@ -75,10 +75,10 @@ func (s *Server) registerEnvironmentRoutes(g *echo.Group) {// Ensure the environment has no instance before it's archived.if v := envPatch.RowStatus; v != nil && *v == string(api.Archived) {- archivedStatus := api.Archived+ normalStatus := api.Normalinstances, err := s.store.FindInstance(ctx, &api.InstanceFind{EnvironmentID: &id,- RowStatus: &archivedStatus,+ RowStatus: &normalStatus,})if err != nil {return echo.NewHTTPError(http.StatusInternalServerError, fmt.Errorf("Failed to find instances in the environment %d", id)).SetInternal(err)