]> git.parisson.com Git - teleforma.git/commitdiff
bugfix
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Wed, 17 Mar 2021 15:58:12 +0000 (16:58 +0100)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Wed, 17 Mar 2021 15:58:12 +0000 (16:58 +0100)
teleforma/views/crfpa.py

index d1614925528d170ab5deb265cbc4edb5a435cd35..66c6b4d0fa87d391b674cf58453b1c08a7522ffc 100644 (file)
@@ -493,12 +493,12 @@ class UserXLSBook(object):
             amount = row[i]
             payment_type = row[i+1]
             payments = Payment.objects.filter(student=student, month=month[0])
-            student.restricted = False
+            student.restricted = True
             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.restricted = True
+                student.restricted = False
             i += 2
 
         student.save()