fix(sva): when there were resolved corrections and a pending correction
This commit is contained in:
parent
cae524b6bd
commit
b50d42fbb4
2 changed files with 15 additions and 1 deletions
|
@ -59,7 +59,7 @@ class SVASVRDecisionDateCalculatorService
|
|||
end
|
||||
|
||||
def latest_correction_date
|
||||
correction_date dossier.corrections.max_by(&:resolved_at)
|
||||
correction_date dossier.corrections.max_by { _1.resolved_at || Time.current }
|
||||
end
|
||||
|
||||
def calculate_correction_delay(start_date)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue