Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Send mail to a list when a new IETF WG -00 is submitted. Fixes #2730.…
… Commit ready for merge. - Legacy-Id: 16287
- Loading branch information
Showing
5 changed files
with
11,067 additions
and
13,405 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Copyright The IETF Trust 2019, All Rights Reserved | ||
# -*- coding: utf-8 -*- | ||
from __future__ import unicode_literals | ||
|
||
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 = 'new_wg_doc_list', | ||
desc = "The email list for announcing new WG -00 submissions", | ||
template = '<new-wg-docs@ietf.org>' | ||
) | ||
changed = MailTrigger.objects.create( | ||
slug = 'sub_new_wg_00', | ||
desc = 'Recipients when a new IETF WG -00 draft is announced', | ||
) | ||
changed.to.set(Recipient.objects.filter(slug__in=['new_wg_doc_list'])) | ||
|
||
|
||
def reverse(apps, schema_editor): | ||
MailTrigger = apps.get_model('mailtrigger','MailTrigger') | ||
Recipient = apps.get_model('mailtrigger', 'Recipient') | ||
|
||
MailTrigger.objects.filter(slug='sub_new_wg_00').delete() | ||
Recipient.objects.filter(slug='new_wg_doc_list').delete() | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('mailtrigger', '0005_slides_proposed'), | ||
] | ||
|
||
operations = [ | ||
migrations.RunPython(forward,reverse) | ||
] |
Oops, something went wrong.