Merged in [18991] from jennifer@painless-security.com:
Missing migration needed by [18960] / [18977] - Legacy-Id: 19002 Note: SVN reference [18960] has been migrated to Git commitb08110b838
Note: SVN reference [18977] has been migrated to Git commit6a70e862df
Note: SVN reference [18991] has been migrated to Git commitc09cd8b651
This commit is contained in:
parent
b8771006b3
commit
1c05b778a4
|
@ -119,7 +119,8 @@ rev=${rev#r}
|
||||||
|
|
||||||
repo=$(echo -n "$(svn info | grep "^Repository Root: " | sed 's/Repository Root: //')")
|
repo=$(echo -n "$(svn info | grep "^Repository Root: " | sed 's/Repository Root: //')")
|
||||||
|
|
||||||
by=$(getent passwd $(whoami) | cut -d ':' -f 5 | tr -d ',')
|
[ -z "$by" ] && by=${RELEASER_REAL_NAME}
|
||||||
|
[ -z "$by" ] && by=$(getent passwd $(whoami) | cut -d ':' -f 5 | tr -d ',')
|
||||||
[ -z "$by" ] && die "Can't determine the real name of the user running this script"
|
[ -z "$by" ] && die "Can't determine the real name of the user running this script"
|
||||||
|
|
||||||
python -c 'import django' || die "Can't find django - can't run tests"
|
python -c 'import django' || die "Can't find django - can't run tests"
|
||||||
|
|
|
@ -0,0 +1,37 @@
|
||||||
|
# Generated by Django 2.2.20 on 2021-05-13 07:20
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
def forward(apps, schema_editor):
|
||||||
|
"""Add new MailTrigger and Recipients"""
|
||||||
|
MailTrigger = apps.get_model('mailtrigger', 'MailTrigger')
|
||||||
|
Recipient = apps.get_model('mailtrigger', 'Recipient')
|
||||||
|
|
||||||
|
mt, created = MailTrigger.objects.get_or_create(slug='doc_external_resource_change_requested')
|
||||||
|
if created:
|
||||||
|
mt.desc='Recipients when a change to the external resources for a document is requested.'
|
||||||
|
mt.save()
|
||||||
|
for recipient_slug in [
|
||||||
|
"doc_ad",
|
||||||
|
"doc_group_chairs",
|
||||||
|
"doc_group_delegates",
|
||||||
|
"doc_shepherd",
|
||||||
|
"doc_stream_manager"
|
||||||
|
]:
|
||||||
|
mt.to.add(Recipient.objects.get(slug=recipient_slug))
|
||||||
|
|
||||||
|
|
||||||
|
def reverse(apps, schema_editor):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('mailtrigger', '0021_email_remind_action_holders'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.RunPython(forward, reverse)
|
||||||
|
]
|
Loading…
Reference in a new issue