]> git.parisson.com Git - teleforma.git/commitdiff
Fix zero script return master-http
authorGuillaume Pellerin <yomguy@parisson.com>
Sat, 20 Jul 2019 21:22:04 +0000 (23:22 +0200)
committerGuillaume Pellerin <yomguy@parisson.com>
Sat, 20 Jul 2019 21:22:04 +0000 (23:22 +0200)
teleforma/exam/models.py
teleforma/management/commands/teleforma-export-wifi-accounts.py

index 75cec3efbbf8efd7977100fc3fc9f9e6eb7f6fcb..b793e992130ffb0eacce3d008cc061285383ab34 100755 (executable)
@@ -173,8 +173,7 @@ class Quota(models.Model):
             q = q.filter(date_submitted__gte=self.date_start).filter(date_submitted__lte=self.date_end)
             return q.count()
         else:
-            return None
-
+            return 0
 
     @property
     def all_script_count(self):
index 9056ddf858d2ea4ac79155c58c829123a1451b02..7b96912285b0b3db9ac5527e79ac6dfd336d2f8f 100644 (file)
@@ -29,8 +29,6 @@ class Command(BaseCommand):
                 student = students[0]
                 if student.is_subscribed and user.is_active and student.period == period:
                     data = []
-                    data.append(user.first_name)
-                    data.append(user.last_name)
                     data.append(p.wifi_login)
                     data.append(p.wifi_pass)
                     data.append('\n')