From c9a6a43d557243667a458164506f2c37de0a467f Mon Sep 17 00:00:00 2001 From: tnicolas1 <166516439+tnicolas1@users.noreply.github.com> Date: Wed, 22 Jan 2025 15:06:05 +0100 Subject: [PATCH] =?UTF-8?q?Gestion=20de=20'latest=5Fpayment=5Frequest'=20?= =?UTF-8?q?=C3=A0=20null=20dans=20la=20fonction=20'num=5Fpresta=5Fdoss'=20?= =?UTF-8?q?(#1341)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/pfmp.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/models/pfmp.rb b/app/models/pfmp.rb index d73450b31..5bf212ec8 100644 --- a/app/models/pfmp.rb +++ b/app/models/pfmp.rb @@ -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?