expand if statement for linter

This commit is contained in:
zandercymatics 2024-07-01 09:59:25 -06:00
parent ef3dd0e545
commit 1dff1c01ca
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7

View file

@ -1953,10 +1953,13 @@ class DomainRequestAdmin(ListHeaderAdmin, ImportExportModelAdmin):
template_subject_path = f"emails/action_needed_reasons/{action_needed_reason}_subject.txt" template_subject_path = f"emails/action_needed_reasons/{action_needed_reason}_subject.txt"
subject_template = get_template(template_subject_path) subject_template = get_template(template_subject_path)
recipient = domain_request.creator if flag_is_active(None, "profile_feature") else domain_request.submitter if flag_is_active(None, "profile_feature"): # type: ignore
recipient = domain_request.creator
else:
recipient = domain_request.submitter
# Return the content of the rendered views # Return the content of the rendered views
context = {"domain_request": domain_request, "recipient": recipient} context = {"domain_request": domain_request, "recipient": recipient}
return { return {
"subject_text": subject_template.render(context=context), "subject_text": subject_template.render(context=context),
"email_body_text": template.render(context=context), "email_body_text": template.render(context=context),