mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Fix: Allow creating snapshot with no dashboard id (#58669)
This commit is contained in:
parent
839465ae44
commit
d279b6d7b0
@ -130,11 +130,6 @@ func (hs *HTTPServer) CreateDashboardSnapshot(c *models.ReqContext) response.Res
|
|||||||
|
|
||||||
metrics.MApiDashboardSnapshotExternal.Inc()
|
metrics.MApiDashboardSnapshotExternal.Inc()
|
||||||
} else {
|
} else {
|
||||||
if cmd.Dashboard.Get("id").MustInt64() == 0 {
|
|
||||||
c.JSON(http.StatusBadRequest, "Creating a local snapshot requires a dashboard")
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
if cmd.Key == "" {
|
if cmd.Key == "" {
|
||||||
var err error
|
var err error
|
||||||
cmd.Key, err = util.GetRandomString(32)
|
cmd.Key, err = util.GetRandomString(32)
|
||||||
|
Loading…
Reference in New Issue
Block a user