From 8259d1034062b461551e1026d630012d2b2423f8 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Wed, 17 Mar 2021 13:18:15 +0100 Subject: [PATCH] import: multipls users --- teleforma/views/crfpa.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/teleforma/views/crfpa.py b/teleforma/views/crfpa.py index 5b2b5e0a..4f371ea8 100644 --- a/teleforma/views/crfpa.py +++ b/teleforma/views/crfpa.py @@ -481,8 +481,7 @@ class UserXLSBook(object): else: print(last_name.encode('utf8') + ' : updating') - user = users[0] - student = user.student.get() + student = Student.objects.get(user=user, period=period) i = 24 for month in months_choices: @@ -491,6 +490,7 @@ class UserXLSBook(object): payments = Payment.objects.filter(student=student, month=month[0]) if not payments and amount: payment = Payment(student=student, value=float(amount), month=month[0], type=payment_type, online_paid=True) + print(last_name.encode('utf8') + ' : add payment') payment.save() student.is_subscribed = True i += 2 -- 2.39.5