Alerting: Fix no-change scenario in provisioning rule update API (#98389)

This commit is contained in:
Alexander Akhmetov
2024-12-30 16:03:45 +01:00
committed by GitHub
parent 6178320257
commit 5735a0d11d
4 changed files with 94 additions and 19 deletions
@@ -383,6 +383,11 @@ func (srv *ProvisioningSrv) RoutePutAlertRule(c *contextmodel.ReqContext, ar def
)
}
if UID == "" {
// If there is no UID, return 404 as the UID is part of the URL.
return response.Empty(http.StatusNotFound)
}
updated.OrgID = c.SignedInUser.GetOrgID()
updated.UID = UID
provenance := determineProvenance(c)