linter and bug fix

This commit is contained in:
matthewswspence 2025-03-25 12:16:05 -05:00
parent 8832f7cb9c
commit 4cd0747af1
No known key found for this signature in database
GPG key ID: FB458202A7852BA4
4 changed files with 18 additions and 12 deletions

View file

@ -3096,15 +3096,17 @@ class DomainRequestAdmin(ListHeaderAdmin, ImportExportRegistrarModelAdmin):
# Hide FEB fields behind the organization requests flag # Hide FEB fields behind the organization requests flag
# and only show them if the portfolio is executive # and only show them if the portfolio is executive
if not (obj and obj.portfolio and obj.portfolio.federal_type == BranchChoices.EXECUTIVE): if not (obj and obj.portfolio and obj.portfolio.federal_type == BranchChoices.EXECUTIVE):
excluded_fields.extend([ excluded_fields.extend(
"feb_naming_requirements_details", [
"feb_purpose_choice", "feb_naming_requirements_details",
"time_frame_details", "feb_purpose_choice",
"interagency_initiative_details", "time_frame_details",
"eop_stakeholder_first_name", "interagency_initiative_details",
"eop_stakeholder_last_name", "eop_stakeholder_first_name",
"eop_stakeholder_email", "eop_stakeholder_last_name",
]) "eop_stakeholder_email",
]
)
# This makes .gov domain collapsable underneath Requested By # This makes .gov domain collapsable underneath Requested By
fieldsets[2][1]["classes"] = ["collapse--dgfieldset"] fieldsets[2][1]["classes"] = ["collapse--dgfieldset"]
modified_fieldsets = [] modified_fieldsets = []

View file

@ -1029,7 +1029,7 @@ class DomainRequest(TimeStampedModel):
if not context: if not context:
has_organization_feature_flag = flag_is_active_for_user(recipient, "organization_feature") has_organization_feature_flag = flag_is_active_for_user(recipient, "organization_feature")
is_org_user = has_organization_feature_flag and recipient.has_view_portfolio_permission(self.portfolio) is_org_user = has_organization_feature_flag and recipient.has_view_portfolio_permission(self.portfolio)
requires_feb_questions = self.requires_feb_questions() requires_feb_questions = self.is_feb() and is_org_user
context = { context = {
"domain_request": self, "domain_request": self,
# This is the user that we refer to in the email # This is the user that we refer to in the email

View file

@ -1841,7 +1841,9 @@ class DomainRequestExport(BaseExport):
# FEB fields # FEB fields
purpose_type = model.get("feb_purpose_choice") purpose_type = model.get("feb_purpose_choice")
purpose_type_display = DomainRequest.FEBPurposeChoices.get_purpose_label(purpose_type) if purpose_type else "N/A" purpose_type_display = (
DomainRequest.FEBPurposeChoices.get_purpose_label(purpose_type) if purpose_type else "N/A"
)
eop_stakeholder_first_name = model.get("eop_stakeholder_first_name") eop_stakeholder_first_name = model.get("eop_stakeholder_first_name")
eop_stakeholder_last_name = model.get("eop_stakeholder_last_name") eop_stakeholder_last_name = model.get("eop_stakeholder_last_name")
if not eop_stakeholder_first_name or not eop_stakeholder_last_name: if not eop_stakeholder_first_name or not eop_stakeholder_last_name:

View file

@ -1180,7 +1180,9 @@ class PortfolioDomainRequestStatusViewOnly(DetailView):
context["form_titles"] = wizard.titles context["form_titles"] = wizard.titles
logger.debug(self.object.is_feb()) logger.debug(self.object.is_feb())
logger.debug(flag_is_active_for_user(self.request.user, "organization_feature")) logger.debug(flag_is_active_for_user(self.request.user, "organization_feature"))
context["requires_feb_questions"] = self.object.is_feb() and flag_is_active_for_user(self.request.user, "organization_feature") context["requires_feb_questions"] = self.object.is_feb() and flag_is_active_for_user(
self.request.user, "organization_feature"
)
return context return context