Fix merge fallout and migrations

This commit is contained in:
Neil Martinsen-Burrell 2022-12-07 09:48:56 -06:00
parent 5d56c88ba5
commit 3e878c776d
No known key found for this signature in database
GPG key ID: 6A3C818CC10D0184
5 changed files with 29 additions and 5 deletions

View file

@ -555,7 +555,7 @@ class ApplicationWizard(LoginRequiredMixin, NamedUrlSessionWizardView):
return None
else:
# they have answered this question
if organization_type == DomainApplication.FEDERAL:
if organization_type == DomainApplication.OrganizationChoices.FEDERAL:
return True
return False

View file

@ -0,0 +1,21 @@
# Generated by Django 4.1.3 on 2022-12-07 15:43
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
(
"registrar",
"0003_rename_is_election_office_domainapplication_is_election_board_and_more",
),
]
operations = [
migrations.AddField(
model_name="domainapplication",
name="federal_agency",
field=models.TextField(help_text="Top level federal agency", null=True),
),
]

View file

@ -138,6 +138,10 @@ class DomainApplication(TimeStampedModel):
help_text="Type of Organization",
)
federal_agency = models.TextField(
null=True, blank=False, help_text="Top level federal agency"
)
federal_type = models.CharField(
max_length=50,
choices=BranchChoices.choices,

View file

@ -34,8 +34,8 @@
{{ wizard.form.address_line1|add_class:"usa-input" }}
{{ wizard.form.address_line2|add_label_class:"usa-label" }}
{{ wizard.form.address_line2|add_class:"usa-input" }}
{{ wizard.form.us_state|add_label_class:"usa-label" }}
{{ wizard.form.us_state|add_class:"usa-select" }}
{{ wizard.form.state_territory|add_label_class:"usa-label" }}
{{ wizard.form.state_territory|add_class:"usa-select" }}
{{ wizard.form.zipcode|add_label_class:"usa-label" }}
{{ wizard.form.zipcode|add_class:"usa-input usa-input--small" }}

View file

@ -519,7 +519,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
# continuing on in the flow we need to see top-level agency on the
# contact page
federal_page.form["organization_federal-federal_type"] = "Executive"
federal_page.form["organization_federal-federal_type"] = "executive"
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
federal_result = federal_page.form.submit()
# the post request should return a redirect to the contact
@ -577,7 +577,6 @@ class DomainApplicationTests(TestWithUser, WebTest):
contact_page = election_result.follow()
self.assertNotContains(contact_page, "Top level federal agency")
@skip("WIP")
def test_application_edit_restore(self):
"""