Ver Fonte

fix(alerting): makes valid to save more explicit

bergquist há 9 anos atrás
pai
commit
bb6888885e
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      pkg/models/alert.go

+ 1 - 1
pkg/models/alert.go

@@ -24,7 +24,7 @@ type Alert struct {
 }
 
 func (alert *Alert) ValidToSave() bool {
-	return alert.DashboardId != 0
+	return alert.DashboardId != 0 && alert.OrgId != 0 && alert.PanelId != 0
 }
 
 func (this *Alert) ContainsUpdates(other *Alert) bool {