Skip to content

Commit

Permalink
chore: Remove unnecessary .name for StrEnum enums
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Dec 6, 2023
1 parent e089723 commit 6a51081
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/dependencies.py
Expand Up @@ -97,7 +97,7 @@ def raise_if_unauthorized(
if application.status not in statuses:
raise HTTPException(
status_code=status.HTTP_409_CONFLICT,
detail=f"Application status should not be {application.status.name}",
detail=f"Application status should not be {application.status}",
)


Expand Down
2 changes: 1 addition & 1 deletion app/routers/applications.py
Expand Up @@ -177,7 +177,7 @@ async def approve_application(
not_validated_documents = []
for document in application.borrower_documents:
if not document.verified:
not_validated_documents.append(document.type.name)
not_validated_documents.append(document.type)
if not_validated_documents:
logger.error("Following documents were not validated: %s", not_validated_documents)
raise HTTPException(
Expand Down
4 changes: 1 addition & 3 deletions app/routers/downloads.py
Expand Up @@ -167,9 +167,7 @@ async def export_applications(
get_translated_string("Legal Name", lang): application.borrower.legal_name,
get_translated_string("Email Address", lang): application.primary_email,
get_translated_string("Submission Date", lang): application.borrower_submitted_at,
get_translated_string("Stage", lang): get_translated_string(
application.status.name.capitalize(), lang
),
get_translated_string("Stage", lang): get_translated_string(application.status.capitalize(), lang),
}
)

Expand Down

0 comments on commit 6a51081

Please sign in to comment.