-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ticket #2147: Ensure domain Request and domain Info have "Non-federal" instead of None when empty #2169
Ticket #2147: Ensure domain Request and domain Info have "Non-federal" instead of None when empty #2169
Conversation
🥳 Successfully deployed to developer sandbox za. |
🥳 Successfully deployed to developer sandbox za. |
🥳 Successfully deployed to developer sandbox za. |
🥳 Successfully deployed to developer sandbox za. |
1 similar comment
🥳 Successfully deployed to developer sandbox za. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -751,6 +752,10 @@ def approve(self, send_email=True): | |||
domain request into an admin on that domain. It also triggers an email | |||
notification.""" | |||
|
|||
if self.federal_agency is None: | |||
self.federal_agency = FederalAgency.objects.filter(agency="Non-Federal Agency").first() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: Do we need .first() here? I think the filter on the specific Non-Federal Agency in theory should be specific enough
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without .first, filter will return a queryset object which more or less (simplifying) looks like this: {FederalAgency} rather than FederalAgency. federal_agency expects just the object itself, not a dict of them so it will error out! Good question, thanks
Ticket
Resolves #2147
Changes
Context for reviewers
This PR simply makes sure that, on approval, the federal agency value is set "Non-federal agency" when it would otherwise be None
Setup
Create a new domain request (or use an existing one) with a federal agency value == None. Then, approve the request and inspect the new value.
This field should be untouched otherwise
Code Review Verification Steps
As the original developer, I have
Satisfied acceptance criteria and met development standards
Ensured code standards are met (Original Developer)
Validated user-facing changes (if applicable)
As a code reviewer, I have
Reviewed, tested, and left feedback about the changes
Ensured code standards are met (Code reviewer)
Validated user-facing changes as a developer
New pages have been added to .pa11yci file so that they will be tested with our automated accessibility testing
Checked keyboard navigability
Meets all designs and user flows provided by design/product
Tested general usability, landmarks, page header structure, and links with a screen reader (such as Voiceover or ANDI)
Tested with multiple browsers, the suggestion is to use ones that the developer didn't (check off which ones were used)
(Rarely needed) Tested as both an analyst and applicant user
Note: Multiple code reviewers can share the checklists above, a second reviewers should not make a duplicate checklist
As a designer reviewer, I have
Verified that the changes match the design intention
Validated user-facing changes as a designer
Checked keyboard navigability
Tested general usability, landmarks, page header structure, and links with a screen reader (such as Voiceover or ANDI)
Tested with multiple browsers (check off which ones were used)
(Rarely needed) Tested as both an analyst and applicant user
Screenshots