Skip to content

Commit

Permalink
Gestion de 'latest_payment_request' null
Browse files Browse the repository at this point in the history
  • Loading branch information
tnicolas1 committed Jan 21, 2025
1 parent dfbc93c commit d190953
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)

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 d190953

Please sign in to comment.