Skip to content

Commit

Permalink
FIx: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert-Lebedeu committed Feb 11, 2019
1 parent 2cdd856 commit b902218
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions advanced_filters/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def _build_query_dict(self, formdata=None):
formdata = self.cleaned_data
key = "{field}__{operator}".format(**formdata)
if formdata['operator'] == "isnull":
return {key: 'None'}
return {key: None}
elif formdata['operator'] == "istrue":
return {formdata['field']: True}
elif formdata['operator'] == "isfalse":
Expand Down Expand Up @@ -134,8 +134,8 @@ def _parse_query_dict(query_data, model):
elif query_data['value'] is False:
query_data['operator'] = "isfalse"
else:
query_data['operator'] = operator # default

if not query_data.get('operator') == 'range':
query_data['operator'] = operator # default
if isinstance(query_data.get('value'),
list) and query_data['operator'] == 'range':
date_from = date_to_string(query_data.get('value_from'))
Expand Down

0 comments on commit b902218

Please sign in to comment.