mirror of
https://github.com/grafana/grafana.git
synced 2025-08-03 05:08:36 +08:00
Fix unmaarshal of double pointer (#47586)
* Fix unmaarshal of double pointer * update sdk version
This commit is contained in:
@ -453,9 +453,10 @@ func (hs *HTTPServer) GetHomeDashboard(c *models.ReqContext) response.Response {
|
||||
dash.Meta.IsHome = true
|
||||
dash.Meta.CanEdit = c.SignedInUser.HasRole(models.ROLE_EDITOR)
|
||||
dash.Meta.FolderTitle = "General"
|
||||
dash.Dashboard = simplejson.New()
|
||||
|
||||
jsonParser := json.NewDecoder(file)
|
||||
if err := jsonParser.Decode(&dash.Dashboard); err != nil {
|
||||
if err := jsonParser.Decode(dash.Dashboard); err != nil {
|
||||
return response.Error(500, "Failed to load home dashboard", err)
|
||||
}
|
||||
|
||||
|
@ -1095,8 +1095,8 @@ func restoreDashboardVersionScenario(t *testing.T, desc string, url string, rout
|
||||
}
|
||||
|
||||
func (sc *scenarioContext) ToJSON() *simplejson.Json {
|
||||
var result *simplejson.Json
|
||||
err := json.NewDecoder(sc.resp.Body).Decode(&result)
|
||||
result := simplejson.New()
|
||||
err := json.NewDecoder(sc.resp.Body).Decode(result)
|
||||
require.NoError(sc.t, err)
|
||||
return result
|
||||
}
|
||||
|
Reference in New Issue
Block a user