This commit is contained in:
bergquist 2018-01-31 15:15:15 +01:00
parent 3da2ab61e0
commit 16a1642831
2 changed files with 5 additions and 7 deletions

View File

@ -20,8 +20,6 @@ func init() {
bus.AddHandler("sql", GetDashboardsByPluginId) bus.AddHandler("sql", GetDashboardsByPluginId)
} }
func SaveDashboard(cmd *m.SaveDashboardCommand) error { func SaveDashboard(cmd *m.SaveDashboardCommand) error {
return inTransaction(func(sess *DBSession) error { return inTransaction(func(sess *DBSession) error {
dash := cmd.GetDashboardModel() dash := cmd.GetDashboardModel()

View File

@ -276,10 +276,10 @@ func TestDashboardDataAccess(t *testing.T) {
cmd := m.SaveDashboardCommand{ cmd := m.SaveDashboardCommand{
OrgId: 1, OrgId: 1,
Dashboard: simplejson.NewFromAny(map[string]interface{}{ Dashboard: simplejson.NewFromAny(map[string]interface{}{
"uid": "randomHash", "uid": "randomHash",
"title": "folderId", "title": "folderId",
"style": "light", "style": "light",
"tags": []interface{}{}, "tags": []interface{}{},
}), }),
FolderId: 2, FolderId: 2,
} }
@ -330,7 +330,7 @@ func TestDashboardDataAccess(t *testing.T) {
"version": savedDash.Version, "version": savedDash.Version,
"tags": []interface{}{}, "tags": []interface{}{},
}), }),
FolderId: savedDash.FolderId, FolderId: savedDash.FolderId,
Overwrite: true, Overwrite: true,
} }