From 4d4e6cdae1542e18007a450be571c8750ced07a3 Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Mon, 6 Jun 2022 06:42:09 +0000 Subject: [PATCH] Only set to Confirmed if Waiting for payment --- apiserver/apiserver/api/utils_paypal.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apiserver/apiserver/api/utils_paypal.py b/apiserver/apiserver/api/utils_paypal.py index 1c665b9..3a8f891 100644 --- a/apiserver/apiserver/api/utils_paypal.py +++ b/apiserver/apiserver/api/utils_paypal.py @@ -235,7 +235,8 @@ def check_training(data, training_id, amount): member = training.user.member - training.attendance_status = 'Confirmed' + if training.attendance_status == 'Waiting for payment': + training.attendance_status = 'Confirmed' training.paid_date = datetime.date.today() training.save()