forked from adamlaska/datatracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path0026_programs_meet.py
More file actions
36 lines (29 loc) · 1.12 KB
/
0026_programs_meet.py
File metadata and controls
36 lines (29 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2020-05-01 12:54
from __future__ import unicode_literals
from django.db import migrations
def forward(apps, schema_editor):
GroupFeatures = apps.get_model('group', 'GroupFeatures')
program = GroupFeatures.objects.get(type_id='program')
program.has_meetings = True
program.matman_roles = ['lead', 'chair', 'secr']
program.docman_roles = ['lead', 'chair', 'secr']
program.groupman_roles = ['lead', 'chair', 'secr']
program.role_order = ['lead', 'chair', 'secr']
program.save()
def reverse(apps, schema_editor):
GroupFeatures = apps.get_model('group', 'GroupFeatures')
program = GroupFeatures.objects.get(type_id='program')
program.has_meetings = False
program.matman_roles = ['lead', 'secr']
program.docman_roles = ['lead', 'secr']
program.groupman_roles = ['lead', 'secr']
program.role_order = ['lead', 'secr']
program.save()
class Migration(migrations.Migration):
dependencies = [
('group', '0025_populate_groupman_authroles'),
]
operations = [
migrations.RunPython(forward, reverse),
]