forked from adamlaska/datatracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path0017_lc_to_yang_doctors.py
More file actions
38 lines (27 loc) · 1.16 KB
/
0017_lc_to_yang_doctors.py
File metadata and controls
38 lines (27 loc) · 1.16 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
37
38
# Copyright The IETF Trust 2019-2020, All Rights Reserved
from django.db import migrations
def forward(apps, schema_editor):
MailTrigger = apps.get_model('mailtrigger', 'MailTrigger')
Recipient = apps.get_model('mailtrigger', 'Recipient')
Recipient.objects.create(
slug = 'yang_doctors_secretaries',
desc = 'Yang Doctors Secretaries',
template = ''
)
lc_to_yang_doctors = MailTrigger.objects.create(
slug='last_call_of_doc_with_yang_issued',
desc='Recipients when IETF LC is issued on a document with yang checks',
)
lc_to_yang_doctors.to.set(Recipient.objects.filter(slug='yang_doctors_secretaries'))
def reverse(apps, schema_editor):
MailTrigger = apps.get_model('mailtrigger', 'MailTrigger')
Recipient = apps.get_model('mailtrigger', 'Recipient')
MailTrigger.objects.filter(slug='last_call_of_doc_with_yang_issued').delete()
Recipient.objects.filter(slug='yang_doctors_secretaries').delete()
class Migration(migrations.Migration):
dependencies = [
('mailtrigger', '0016_add_irsg_ballot_issued'),
]
operations = [
migrations.RunPython(forward, reverse),
]