Skip to content

Commit

Permalink
Merge pull request #551 from pipermerriam/piper/issue-548-multi-label…
Browse files Browse the repository at this point in the history
…-filtering-not-correct

Fix multi-label filtering
  • Loading branch information
mmclark committed Dec 14, 2015
2 parents 2c1c3fe + 314332d commit e9afb02
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion seed/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,9 @@ def filter_other_params(queryset, other_params, db_columns):
query_filters &= Q(**{"%s" % k: v})
elif k == 'canonical_building__labels':
for l in v:
query_filters &= Q(**{k: l})
queryset &= queryset.filter(**{
'canonical_building__labels': l
})
else:
query_filters &= Q(**{"%s__icontains" % k: v})

Expand Down

0 comments on commit e9afb02

Please sign in to comment.