[v9.2.x] Fix: Allow creating snapshot with no dashboard id (#59465)
Fix: Allow creating snapshot with no dashboard id (#58669)
(cherry picked from commit d279b6d7b0)
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
This commit is contained in:
co-authored by
Gabriel MABILLE
parent
6b4394d8e6
commit
ac9819bfa5
@@ -130,11 +130,6 @@ func (hs *HTTPServer) CreateDashboardSnapshot(c *models.ReqContext) response.Res
|
||||
|
||||
metrics.MApiDashboardSnapshotExternal.Inc()
|
||||
} else {
|
||||
if cmd.Dashboard.Get("id").MustInt64() == 0 {
|
||||
c.JSON(http.StatusBadRequest, "Creating a local snapshot requires a dashboard")
|
||||
return nil
|
||||
}
|
||||
|
||||
if cmd.Key == "" {
|
||||
var err error
|
||||
cmd.Key, err = util.GetRandomString(32)
|
||||
|
||||
Reference in New Issue
Block a user