Skip to content
This repository has been archived by the owner on Jun 1, 2022. It is now read-only.

Commit

Permalink
'Last known event date' as alias for planned_closure, closes #438
Browse files Browse the repository at this point in the history
Also a migration which covers some recent model metadata changes
  • Loading branch information
simonw committed Apr 28, 2021
1 parent 7860c99 commit b74b17d
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Generated by Django 3.1.8 on 2021-04-28 17:25

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("core", "0107_decimal_for_latitude_longitude"),
]

operations = [
migrations.AlterModelOptions(
name="availabilitytag",
options={"ordering": ["-group", "name"]},
),
migrations.AlterField(
model_name="report",
name="planned_closure",
field=models.DateField(
blank=True,
help_text='Date this site a site plans to stop operating, "planned_closure" in our API',
null=True,
verbose_name="Last known event date",
),
),
migrations.AlterField(
model_name="report",
name="report_source",
field=models.CharField(
choices=[
("ca", "Caller app"),
("dc", "Data corrections"),
("wb", "Web banking"),
],
default="ca",
max_length=2,
),
),
]
5 changes: 4 additions & 1 deletion vaccinate/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,10 @@ class ReportSource(models.TextChoices):
blank=True, null=True, help_text="Update for hours information"
)
planned_closure = models.DateField(
blank=True, null=True, help_text="Date this site a site plans to stop operating"
blank=True,
null=True,
help_text='Date this site a site plans to stop operating, "planned_closure" in our API',
verbose_name="Last known event date",
)
reported_by = models.ForeignKey(
Reporter, related_name="reports", on_delete=models.PROTECT
Expand Down

0 comments on commit b74b17d

Please sign in to comment.