Browse Source

EqualFold()

tpetr 7 năm trước cách đây
mục cha
commit
db61fc1dd1
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      pkg/services/dashboards/dashboard_service.go

+ 1 - 1
pkg/services/dashboards/dashboard_service.go

@@ -76,7 +76,7 @@ func (dr *dashboardServiceImpl) buildSaveDashboardCommand(dto *SaveDashboardDTO,
 		return nil, models.ErrDashboardFolderCannotHaveParent
 	}
 
-	if dash.IsFolder && strings.ToLower(dash.Title) == strings.ToLower(models.RootFolderName) {
+	if dash.IsFolder && strings.EqualFold(dash.Title, models.RootFolderName) {
 		return nil, models.ErrDashboardFolderNameExists
 	}