From: Guillaume Pellerin Date: Mon, 15 Feb 2016 22:57:04 +0000 (+0100) Subject: fix multiple same quota period X-Git-Tag: 1.1~71 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=fd8f8c01e163860a504a8794a6a8d24f3ff39b6d;p=teleforma.git fix multiple same quota period --- 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