remove post trim

This commit is contained in:
Ying WANG 2021-05-27 09:21:16 +02:00
parent 3b3ceee16e
commit 46fe8ed596

View File

@ -277,13 +277,6 @@ func (hs *HTTPServer) PostDashboard(c *models.ReqContext, cmd models.SaveDashboa
var err error
cmd.OrgId = c.OrgId
cmd.UserId = c.UserId
trimDefaults := c.QueryBoolWithDefault("trimdefaults", false)
if trimDefaults && !hs.LoadSchemaService.IsDisabled() {
cmd.Dashboard, err = hs.LoadSchemaService.DashboardApplyDefaults(cmd.Dashboard)
if err != nil {
return response.Error(500, "Error while applying default value to the dashboard json", err)
}
}
if cmd.FolderUid != "" {
folders := dashboards.NewFolderService(c.OrgId, c.SignedInUser, hs.SQLStore)
folder, err := folders.GetFolderByUID(cmd.FolderUid)