Commit 77e7887e by bergquist

provisioning: check provisiong before saveCmd

parent 7845eab5
......@@ -93,6 +93,11 @@ func (dr *dashboardServiceImpl) buildSaveDashboardCommand(dto *SaveDashboardDTO,
}
}
err := dr.validateDashboardIsNotProvisioned(dash.Id)
if err != nil {
return nil, err
}
validateBeforeSaveCmd := models.ValidateDashboardBeforeSaveCommand{
OrgId: dto.OrgId,
Dashboard: dash,
......@@ -111,11 +116,6 @@ func (dr *dashboardServiceImpl) buildSaveDashboardCommand(dto *SaveDashboardDTO,
return nil, models.ErrDashboardUpdateAccessDenied
}
err := dr.validateDashboardIsNotProvisioned(dash.Id)
if err != nil {
return nil, err
}
cmd := &models.SaveDashboardCommand{
Dashboard: dash.Data,
Message: dto.Message,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment