From: Guillaume Pellerin Date: Wed, 17 Mar 2021 12:18:15 +0000 (+0100) Subject: import: multipls users X-Git-Tag: 1.4.3~12 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=8259d1034062b461551e1026d630012d2b2423f8;p=teleforma.git import: multipls users --- 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