redash/migrations/0015_add_schedule_query_permission.py

7 lines
292 B
Python
Raw Normal View History

2015-11-07 17:52:32 +00:00
from redash import models
if __name__ == '__main__':
default_group = models.Group.select(models.Group.id, models.Group.permissions).where(models.Group.name=='default').first()
2015-11-07 17:52:32 +00:00
default_group.permissions.append('schedule_query')
default_group.save(only=[models.Group.permissions])