Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Fix/14993: EOL - About to expire/Expired Certificates loose this info in EOL #5123

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -861,9 +861,16 @@ class HealthCertificateService: HealthCertificateServiceServable {
}

private func updateValidityState(for healthCertificate: HealthCertificate, person: HealthCertifiedPerson) {
// Hibernation
guard !CWAHibernationProvider.shared.isHibernationState else {
// In hibernation we set the validity state of any health certificate to valid.
healthCertificate.validityState = .valid

// In hibernation we set the validity state of any health certificate to expired or valid.
if Date() >= healthCertificate.expirationDate {
healthCertificate.validityState = .expired
} else {
healthCertificate.validityState = .valid
}

return
}

Expand Down