mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-26 04:28:39 +02:00
Make email and notes required, fix unit test
This commit is contained in:
parent
784b187b09
commit
8570a03600
3 changed files with 7 additions and 7 deletions
|
@ -1,4 +1,4 @@
|
|||
# Generated by Django 4.2.7 on 2024-01-23 21:02
|
||||
# Generated by Django 4.2.7 on 2024-01-23 23:51
|
||||
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
|
@ -17,8 +17,8 @@ class Migration(migrations.Migration):
|
|||
("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
|
||||
("created_at", models.DateTimeField(auto_now_add=True)),
|
||||
("updated_at", models.DateTimeField(auto_now=True)),
|
||||
("email", models.EmailField(blank=True, db_index=True, help_text="Email", max_length=254)),
|
||||
("notes", models.TextField(blank=True, help_text="Notes")),
|
||||
("email", models.EmailField(db_index=True, help_text="Email", max_length=254)),
|
||||
("notes", models.TextField(help_text="Notes")),
|
||||
(
|
||||
"requestor",
|
||||
models.ForeignKey(
|
||||
|
|
|
@ -9,7 +9,7 @@ class VeryImportantPerson(TimeStampedModel):
|
|||
|
||||
email = models.EmailField(
|
||||
null=False,
|
||||
blank=True,
|
||||
blank=False,
|
||||
help_text="Email",
|
||||
db_index=True,
|
||||
)
|
||||
|
@ -24,7 +24,7 @@ class VeryImportantPerson(TimeStampedModel):
|
|||
|
||||
notes = models.TextField(
|
||||
null=False,
|
||||
blank=True,
|
||||
blank=False,
|
||||
help_text="Notes",
|
||||
)
|
||||
|
||||
|
|
|
@ -1757,7 +1757,7 @@ class VeryImportantPersonAdminTestCase(TestCase):
|
|||
|
||||
# Create a request object
|
||||
request = self.factory.post("/admin/yourapp/veryimportantperson/add/")
|
||||
request.requestor = self.superuser
|
||||
request.user = self.superuser
|
||||
|
||||
# Call the save_model method
|
||||
admin_instance.save_model(request, vip_instance, None, None)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue