Skip to content

Commit

Permalink
Limit default dashboard removal.
Browse files Browse the repository at this point in the history
  • Loading branch information
Hyperkid123 committed May 30, 2024
1 parent 2b4e1be commit 76dd2c0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/migrate/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ func migrateDashboardWidgets(tx *gorm.DB) *gorm.DB {

templates = []models.DashboardTemplate{}

logrus.Infoln("Removing all non default templates")
// remove all non default templates
res = tx.Unscoped().Where(`"default" is false`).Delete(&[]models.DashboardTemplate{})
res = tx.Unscoped().Debug().Where(`"default" is false`).Limit(50).Delete(&[]models.DashboardTemplate{})
if res.Error != nil {
return res
}
Expand Down

0 comments on commit 76dd2c0

Please sign in to comment.