Skip to content

Commit

Permalink
Add deselected_source to Memberships
Browse files Browse the repository at this point in the history
  • Loading branch information
VirginiaDooley committed Sep 25, 2023
1 parent 5822fd9 commit 5abd8a8
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
20 changes: 20 additions & 0 deletions ynr/apps/popolo/migrations/0050_membership_deselected_source.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Generated by Django 4.2.3 on 2023-09-21 16:33

from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("popolo", "0049_membership_deselected"),
]

operations = [
migrations.AddField(
model_name="membership",
name="deselected_source",
field=models.URLField(
blank=True,
help_text="A URL to a source document about the deselection",
),
),
]
5 changes: 5 additions & 0 deletions ynr/apps/popolo/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,11 @@ class Membership(Dateframeable, TimeStampedModel, models.Model):
help_text="Whether this candidate was deselected by their party, but remains on the ballot",
)

deselected_source = models.URLField(
blank=True,
help_text="A URL to a source document about the deselection",
)

objects = MembershipQuerySet.as_manager()

def save(self, *args, **kwargs):
Expand Down

0 comments on commit 5abd8a8

Please sign in to comment.