Skip to content

Commit

Permalink
Gestion de 'latest_payment_request' à null dans la fonction 'num_pres…
Browse files Browse the repository at this point in the history
…ta_doss' (#1341)
  • Loading branch information
tnicolas1 authored Jan 22, 2025
1 parent c181e0b commit c9a6a43
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions app/models/pfmp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,9 @@ def administrative_number
end

def num_presta_doss
transition = latest_payment_request.last_transition_to(:integrated)
return nil if latest_payment_request.nil? || latest_payment_request.last_transition_to(:integrated).nil?

return nil if transition.nil?

transition.metadata["numAdmPrestaDoss"]
latest_payment_request.last_transition_to(:integrated).metadata["numAdmPrestaDoss"]
end

def within_schooling_dates?
Expand Down

0 comments on commit c9a6a43

Please sign in to comment.