provisioning: removes id from dashboard.json

if dashboard json files contains `id` we
will just remove it form the dashboard model
before importing it into the database.

closes #11138
This commit is contained in:
bergquist
2018-03-26 13:17:39 +02:00
parent e2ba6fbb00
commit b61bc72e2a
3 changed files with 86 additions and 5 deletions
@@ -170,8 +170,8 @@ func (fr *fileReader) saveDashboard(path string, folderId int64, fileInfo os.Fil
}
if dash.Dashboard.Id != 0 {
fr.log.Error("provisioned dashboard json files cannot contain id")
return provisioningMetadata, nil
dash.Dashboard.Data.Set("id", nil)
dash.Dashboard.Id = 0
}
if alreadyProvisioned {