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

Commit

Permalink
add comment to stats search
Browse files Browse the repository at this point in the history
  • Loading branch information
ngokevin committed Jul 18, 2012
1 parent 8db71b3 commit 9b3cacb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mkt/stats/search.py
Expand Up @@ -210,14 +210,15 @@ def handle_kwargs(q, field, kwargs, join_field=None):
filters. Returns Q object to use in filter.
"""
if join_field:
join_field = join_field + field
join_field += field
kwargs[join_field] = kwargs[field]

# Have '' and None have the same meaning.
if not kwargs[field]:
q = Q(**{field + '__in': ['', None]})
del(kwargs[field])

# We are using the join field to filter so get rid of the plain one.
if join_field:
del(kwargs[field])

Expand Down

0 comments on commit 9b3cacb

Please sign in to comment.