remove general folder in legacy api

This commit is contained in:
Ryan McKinley
2025-12-02 14:48:02 +03:00
parent 3cb29d02ad
commit b1ff3eb2f1
3 changed files with 21 additions and 16 deletions
+4
View File
@@ -1283,6 +1283,10 @@ func (s *Service) buildSaveDashboardCommand(ctx context.Context, dto *dashboards
return nil, dashboards.ErrDashboardFolderNameExists
}
if dash.FolderUID == folder.GeneralFolderUID {
dash.FolderUID = "" // general is the same as root
}
if dash.FolderUID != "" {
if _, err := s.dashboardFolderStore.GetFolderByUID(ctx, dash.OrgID, dash.FolderUID); err != nil {
return nil, err