Skip to content

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

Fix the environment comparison logic in anomaly scanner

天舟ea0f11f9c84c
diff --git a/server/anomaly_scanner.go b/server/anomaly_scanner.go
index 5362e1f505..296233d789 100644
--- a/server/anomaly_scanner.go
+++ b/server/anomaly_scanner.go
@@ -78,7 +78,7 @@ func (s *AnomalyScanner) Run() error {
}
for _, env := range environmentList {
- if env.ID == instance.ID {
+ if env.ID == instance.EnvironmentId {
if env.RowStatus == api.Normal {
instance.Environment = env
}
@@ -86,7 +86,7 @@ func (s *AnomalyScanner) Run() error {
}
}
- if instance.Environment != nil {
+ if instance.Environment == nil {
continue
}