forked from adamlaska/datatracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path0002_conflrev_changes.py
More file actions
40 lines (31 loc) · 1.24 KB
/
0002_conflrev_changes.py
File metadata and controls
40 lines (31 loc) · 1.24 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
39
40
# Copyright The IETF Trust 2018-2020, All Rights Reserved
# -*- coding: utf-8 -*-
# Generated by Django 1.11.13 on 2018-05-21 12:07
from django.db import migrations
def forward(apps, schema_editor):
MailTrigger = apps.get_model('mailtrigger','MailTrigger')
Recipient = apps.get_model('mailtrigger', 'Recipient')
conflrev_ad_changed = MailTrigger.objects.create(
slug = 'conflrev_ad_changed',
desc = 'Recipients when the responsible AD for a conflict review is changed',
)
conflrev_ad_changed.to.set(Recipient.objects.filter(slug='iesg-secretary'))
conflrev_ad_changed.cc.set(Recipient.objects.filter(slug__in=[
'conflict_review_steering_group',
'conflict_review_stream_manager',
'doc_affecteddoc_authors',
'doc_affecteddoc_group_chairs',
'doc_affecteddoc_notify',
'doc_notify',
'iesg',
]))
def reverse(apps, schema_editor):
MailTrigger = apps.get_model('mailtrigger','MailTrigger')
MailTrigger.objects.filter(slug='conflrev_ad_changed').delete()
class Migration(migrations.Migration):
dependencies = [
('mailtrigger', '0001_initial'),
]
operations = [
migrations.RunPython(forward, reverse)
]