Skip to content
This repository has been archived by the owner on Mar 28, 2019. It is now read-only.

Let people exclude values with filters. (refs mozilla-services/#68). #432

Merged
merged 2 commits into from
Sep 2, 2015
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Avoid extra code duplication
almet committed Sep 2, 2015
commit 0bbc450ac1a8ca01e0ed7d0ba52cbade8dc08bfa
5 changes: 1 addition & 4 deletions cliquet/resource.py
Original file line number Diff line number Diff line change
@@ -955,10 +955,7 @@ def _extract_filters(self, queryparams=None):
}
raise_invalid(self.request, **error_details)

if operator is COMPARISON.IN:
value = set([native_value(v) for v in paramvalue.split(',')])

if operator is COMPARISON.EXCLUDE:
if operator in (COMPARISON.IN, COMPARISON.EXCLUDE):
value = set([native_value(v) for v in paramvalue.split(',')])

filters.append(Filter(field, value, operator))