From fd8f8c01e163860a504a8794a6a8d24f3ff39b6d Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Mon, 15 Feb 2016 23:57:04 +0100 Subject: [PATCH] fix multiple same quota period --- teleforma/views/core.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/teleforma/views/core.py b/teleforma/views/core.py index d14462bb..a4f6ca2d 100644 --- a/teleforma/views/core.py +++ b/teleforma/views/core.py @@ -180,7 +180,10 @@ def get_periods(user): quotas = user.quotas.all() if quotas and not (user.is_superuser or user.is_staff) and not professor: - periods = [quota.period for quota in quotas] + periods = [] + for quota in quotas: + if not quota.period in periods: + periods.append(quota.period) return periods -- 2.39.5