From 7aa72a5d407a66e637885e57ec62aa59de30092c Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Sat, 20 Jul 2019 23:22:04 +0200 Subject: [PATCH] Fix zero script return --- teleforma/exam/models.py | 3 +-- .../management/commands/teleforma-export-wifi-accounts.py | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/teleforma/exam/models.py b/teleforma/exam/models.py index 75cec3ef..b793e992 100755 --- a/teleforma/exam/models.py +++ b/teleforma/exam/models.py @@ -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): diff --git a/teleforma/management/commands/teleforma-export-wifi-accounts.py b/teleforma/management/commands/teleforma-export-wifi-accounts.py index 9056ddf8..7b969122 100644 --- a/teleforma/management/commands/teleforma-export-wifi-accounts.py +++ b/teleforma/management/commands/teleforma-export-wifi-accounts.py @@ -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') -- 2.39.5