From f9c2b848e73bf0a596fb77b0a1d425f7c5bd578d Mon Sep 17 00:00:00 2001 From: Adrien Bourmault Date: Fri, 4 Nov 2022 14:40:13 +0100 Subject: [PATCH] Correction bug cotisation --- controle_cotisation/main.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/controle_cotisation/main.py b/controle_cotisation/main.py index 23ffd7b..9d09125 100755 --- a/controle_cotisation/main.py +++ b/controle_cotisation/main.py @@ -343,13 +343,16 @@ def validate(member): "LEFT JOIN acc_transactions_lines l ON l.id_transaction = tu.id_transaction " +\ "INNER JOIN acc_transactions tr ON tr.id = l.id_transaction " +\ "WHERE m.id = {} AND l.id_account = 481;".format(member) -# Note: su.id_service = 1 parceque la cotisation correspond au service 1 + # Note: su.id_service = 1 parceque la cotisation correspond au service 1 try: answer = gestion_read(request)["results"][-1] - except: - print(gestion_read(request)) - raise(Exception) + except IndexError: + BUF.append("* {} (numero inconnu)".format(member)) + BUF.append(" SUPPRESSION MEMBRE") + BUF.append("") + os.remove(WORKDIR+"/transition/"+member) + return date = datetime.datetime.strptime( answer["date"],'%Y-%m-%d').strftime("%d/%m/%Y")