Commit 2362a475 authored by okhin's avatar okhin 🚴

No more lines over 79chars

parent 1473e217
......@@ -23,8 +23,12 @@ class ActiveMandateQueryFilterBackend(BaseFilterBackend):
if self.query_param in request.GET:
if len(request.GET[self.query_param]):
qs = qs.filter(mandates__in=Mandate.objects.filter(Q(end_date__gte=datetime.today)
| Q(end_date__isnull=True)).filter(Q(group__name=request.GET[self.query_param])
| Q(group__abbreviation=request.GET[self.query_param]))).distinct()
qs = qs.filter(mandates__in=Mandate.objects.filter(
Q(end_date__gte=datetime.today)
| Q(end_date__isnull=True)).filter(
Q(group__name=request.GET[self.query_param])
| Q(group__abbreviation=request.GET[self.query_param])
)
).distinct()
return qs
return qs
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment