[v9.3.x] Fix: Allow creating snapshot with no dashboard id (#59462)

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:
Grot (@grafanabot)
2022-11-29 03:53:10 -05:00
committed by GitHub
co-authored by Gabriel MABILLE
parent 3dac951598
commit 7fff085d21
-5
View File
@@ -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)