redash/migrations/0015_add_schedule_query_permission.py
2016-01-24 11:57:05 +02:00

7 lines
292 B
Python

from redash import models
if __name__ == '__main__':
default_group = models.Group.select(models.Group.id, models.Group.permissions).where(models.Group.name=='default').first()
default_group.permissions.append('schedule_query')
default_group.save(only=[models.Group.permissions])