dashboards: created/updated and createdby/updatedby should be set before save

If creating a new folder/dashboard created/updated and createdby/updatedby should always be set.
If updating an existing folder/dashboard updated and updatedby should always be set.
This commit is contained in:
Marcus Efraimsson
2018-02-22 11:54:28 +01:00
parent 20ebb614f6
commit 3f588b4c48
3 changed files with 40 additions and 9 deletions
-4
View File
@@ -166,10 +166,6 @@ func (cmd *SaveDashboardCommand) GetDashboardModel() *Dashboard {
userId = -1
}
if dash.Data.Get("version").MustInt(0) == 0 {
dash.CreatedBy = userId
}
dash.UpdatedBy = userId
dash.OrgId = cmd.OrgId
dash.PluginId = cmd.PluginId