db: create program editors groups
This commit is contained in:
parent
75f1973d41
commit
6469913f8a
18
aircox/migrations/0022_set_group_ownership.py
Normal file
18
aircox/migrations/0022_set_group_ownership.py
Normal file
|
@ -0,0 +1,18 @@
|
|||
from django.db import migrations
|
||||
|
||||
from aircox.models import Program
|
||||
|
||||
|
||||
def set_group_ownership(*args):
|
||||
for program in Program.objects.all():
|
||||
program.set_group_ownership()
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
dependencies = [
|
||||
("aircox", "0021_alter_schedule_timezone"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RunPython(set_group_ownership),
|
||||
]
|
Loading…
Reference in New Issue
Block a user