Dashboards: Prevent saving to a non-existent folder (#103503)
This commit is contained in:
@@ -90,6 +90,8 @@ func (d *dashboardStore) ValidateDashboardBeforeSave(ctx context.Context, dash *
|
||||
|
||||
if folderIdFound {
|
||||
dash.FolderID = existing.ID // nolint:staticcheck
|
||||
} else {
|
||||
return dashboards.ErrDashboardFolderNotFound
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user