Skip to content

Commit

Permalink
Make EmailSignUp disclaimer_page null on deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
willbarton committed Sep 10, 2024
1 parent 4794e8c commit e5921f0
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
20 changes: 20 additions & 0 deletions cfgov/v1/migrations/0037_emailsignup_disclaimer_page_set_null.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Generated by Django 4.2.14 on 2024-08-26 13:13

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

dependencies = [
('wagtailcore', '0093_uploadedfile'),
('v1', '0036_delete_cdnhistory'),
]

operations = [
migrations.AlterField(
model_name='emailsignup',
name='disclaimer_page',
field=models.ForeignKey(blank=True, help_text='Choose the page that the "See Privacy Act statement" link should go to. If in doubt, use "Generic Email Sign-Up Privacy Act Statement".', null=True, on_delete=django.db.models.deletion.SET_NULL, to='wagtailcore.page', verbose_name='Privacy Act statement'),
),
]
2 changes: 1 addition & 1 deletion cfgov/v1/models/snippets.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class EmailSignUp(RevisionMixin, models.Model):
verbose_name="Privacy Act statement",
null=True,
blank=True,
on_delete=models.PROTECT,
on_delete=models.SET_NULL,
help_text=(
'Choose the page that the "See Privacy Act statement" link '
'should go to. If in doubt, use "Generic Email Sign-Up '
Expand Down

0 comments on commit e5921f0

Please sign in to comment.