Commit 132589d0 authored by okhin's avatar okhin 🚴

Merge branch '184-returning-meps-with-an-active-mandates-in-django-rql-filter' into 'master'

Oopsie …

Closes #184

See merge request !187
parents ac835173 52bfdd01
...@@ -24,7 +24,7 @@ class ActiveMandateQueryFilterBackend(BaseFilterBackend): ...@@ -24,7 +24,7 @@ class ActiveMandateQueryFilterBackend(BaseFilterBackend):
if self.query_param in request.GET: if self.query_param in request.GET:
if len(request.GET[self.query_param]): if len(request.GET[self.query_param]):
# We want to check for params in a list of mandates # We want to check for params in a list of mandates
mandates = request.GET[self.query_params].split(',') mandates = request.GET[self.query_param].split(',')
qs = qs.filter(mandates__in=Mandate.objects.filter( qs = qs.filter(mandates__in=Mandate.objects.filter(
Q(end_date__gte=datetime.today) | Q(end_date__gte=datetime.today) |
Q(end_date__isnull=True)).filter( Q(end_date__isnull=True)).filter(
......
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