Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Political Memory
memopol
Commits
32f583fb
Commit
32f583fb
authored
Feb 27, 2017
by
okhin
🚴
Browse files
Merge branch '186-add-a-query-filter-to-sort-meps-by-active-constituency' into 'master'
Fixing a typo Closes #186 See merge request
!190
parents
6ac7727a
cb6d3c7c
Pipeline
#896
passed with stages
in 8 minutes and 50 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/representatives/filters.py
View file @
32f583fb
...
...
@@ -49,7 +49,7 @@ class ActiveConstituencyFilterBackend(BaseFilterBackend):
qs
=
queryset
if
self
.
query_param
in
request
.
GET
:
if
len
(
request
.
GET
[
self
.
query_param
s
]):
if
len
(
request
.
GET
[
self
.
query_param
]):
mandates
=
urlunquote
(
request
.
GET
[
self
.
query_param
]).
split
(
','
)
qs
=
qs
.
filter
(
mandates__in
=
Mandate
.
objects
.
filter
(
Q
(
end_date__gte
=
datetime
.
today
)
|
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment