Skip to content

Commit

Permalink
Merge pull request #185 from shaangill025/backend_23532
Browse files Browse the repository at this point in the history
Backend: Add isCertificateIssued to applicationHeader
  • Loading branch information
shaangill025 authored Oct 16, 2024
2 parents 58f3edb + d6e5cee commit 7208d0a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions strr-api/src/strr_api/models/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,11 +279,13 @@ def to_dict(application: Application) -> dict:
reviewer_display_name = f"{reviewer_display_name} {application.reviewer.lastname}"
application_dict["header"]["reviewer"]["displayName"] = reviewer_display_name

application_dict["header"]["isCertificateIssued"] = False
if application.registration_id:
application_dict["header"]["registrationId"] = application.registration_id
application_dict["header"]["registrationStartDate"] = application.registration.start_date.isoformat()
application_dict["header"]["registrationEndDate"] = application.registration.expiry_date.isoformat()
application_dict["header"]["registrationStatus"] = application.registration.status.value
application_dict["header"]["registrationNumber"] = application.registration.registration_number
application_dict["header"]["isCertificateIssued"] = bool(application.registration.certificates)

return application_dict

0 comments on commit 7208d0a

Please sign in to comment.