Skip to content

Commit

Permalink
Migration to make sure the default group has correct type
Browse files Browse the repository at this point in the history
  • Loading branch information
arikfr committed Mar 27, 2016
1 parent 6cff6e8 commit dd836d9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions migrations/0023_make_sure_correct_group_type.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from redash import models

if __name__ == '__main__':
with models.db.database.transaction():
groups = models.Group.select(models.Group.id, models.Group.type).where(models.Group.name=='default')
for group in groups:
group.type = models.Group.BUILTIN_GROUP
group.save(only=[models.Group.type])

0 comments on commit dd836d9

Please sign in to comment.