From 56e21f4c8ef33421fbec68ad3effe57e9ba02239 Mon Sep 17 00:00:00 2001 From: zandercymatics <141044360+zandercymatics@users.noreply.github.com> Date: Tue, 14 May 2024 14:30:48 -0600 Subject: [PATCH] Remove old code --- src/registrar/forms/domain_request_wizard.py | 2 +- src/registrar/forms/utility/wizard_form_helper.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/registrar/forms/domain_request_wizard.py b/src/registrar/forms/domain_request_wizard.py index dd29df523..9d16a30de 100644 --- a/src/registrar/forms/domain_request_wizard.py +++ b/src/registrar/forms/domain_request_wizard.py @@ -150,7 +150,7 @@ class OrganizationContactForm(RegistrarForm): """Require something to be selected when this is a federal agency.""" federal_agency = self.cleaned_data.get("federal_agency", None) # need the domain request object to know if this is federal - if hasattr(self, "domain_request") and self.domain_request is None: + if self.domain_request is None: # hmm, no saved domain request object?, default require the agency if not federal_agency: # no answer was selected diff --git a/src/registrar/forms/utility/wizard_form_helper.py b/src/registrar/forms/utility/wizard_form_helper.py index 9b8a7c4d8..2dd1a2b42 100644 --- a/src/registrar/forms/utility/wizard_form_helper.py +++ b/src/registrar/forms/utility/wizard_form_helper.py @@ -21,8 +21,7 @@ class RegistrarForm(forms.Form): def __init__(self, *args, **kwargs): kwargs.setdefault("label_suffix", "") # save a reference to a domain request object - if "domain_request" in kwargs: - self.domain_request = kwargs.pop("domain_request", None) + self.domain_request = kwargs.pop("domain_request", None) super(RegistrarForm, self).__init__(*args, **kwargs)