From 46fe8ed596ada5a047a337088278a4195b05fead Mon Sep 17 00:00:00 2001 From: Ying WANG Date: Thu, 27 May 2021 09:21:16 +0200 Subject: [PATCH] remove post trim --- pkg/api/dashboard.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/pkg/api/dashboard.go b/pkg/api/dashboard.go index 9d4c9909239..75d7d5699d7 100644 --- a/pkg/api/dashboard.go +++ b/pkg/api/dashboard.go @@ -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)