Commit df509e12 authored by okhin's avatar okhin
Browse files

I want to check name or abbreviation of group mandates

parent 5fc2da48
...@@ -23,6 +23,8 @@ class ActiveMandateQueryFilterBackend(BaseFilterBackend): ...@@ -23,6 +23,8 @@ class ActiveMandateQueryFilterBackend(BaseFilterBackend):
if len(request.GET[self.query_param]): if len(request.GET[self.query_param]):
qs = qs.filter(mandates__in=Mandate.objects.filter(Q(| qs = qs.filter(mandates__in=Mandate.objects.filter(Q(|
Q(end_date__isnull=True)) Q(end_date__isnull=True))
.filter(Q(group__name=request.GET[self.query_param]))).distinct() .filter(Q(group__name=request.GET[self.query_param])|
return qs return qs
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