Skip to content

Commit

Permalink
Update model optout_reason
Browse files Browse the repository at this point in the history
  • Loading branch information
DevChima committed Nov 1, 2023
1 parent 4deaaa3 commit 35e6518
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 2 deletions.
31 changes: 31 additions & 0 deletions eventstore/migrations/0061_alter_optout_reason.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Generated by Django 4.1.7 on 2023-11-01 10:33

from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("eventstore", "0060_alter_optout_reason"),
]

operations = [
migrations.AlterField(
model_name="optout",
name="reason",
field=models.CharField(
choices=[
("not_useful", "Not useful"),
("other", "Other"),
("unknown", "Unknown"),
("sms_failure", "SMS failure"),
("whatsapp_failure", "WhatsApp failure"),
("miscarriage", "Miscarriage"),
("stillbirth", "Stillbirth"),
("babyloss", "Lost baby"),
("not_hiv_pos", "Not HIV positive"),
("no_consent_to_privacy_policy", "no consent to privacy policy"),
],
max_length=30,
),
),
]
4 changes: 2 additions & 2 deletions eventstore/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class OptOut(models.Model):
STILLBIRTH_REASON = "stillbirth"
BABYLOSS_REASON = "babyloss"
NOT_HIV_POSITIVE_REASON = "not_hiv_pos"
NO_CONSENT_TO_PRIVACY_POLICY = "no_consent_to_priv_pol"
NO_CONSENT_TO_PRIVACY_POLICY = "no_consent_to_privacy_policy"
REASON_TYPES = (
(NOT_USEFUL_REASON, "Not useful"),
(OTHER_REASON, "Other"),
Expand All @@ -78,7 +78,7 @@ class OptOut(models.Model):
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
contact_id = models.UUIDField()
optout_type = models.CharField(max_length=6, choices=OPTOUT_TYPES)
reason = models.CharField(max_length=23, choices=REASON_TYPES)
reason = models.CharField(max_length=30, choices=REASON_TYPES)
source = models.CharField(max_length=255)
timestamp = models.DateTimeField(default=timezone.now)
created_by = models.CharField(max_length=255, blank=True, default="")
Expand Down

0 comments on commit 35e6518

Please sign in to comment.