Skip to content

Commit

Permalink
NumericRangeFilter: Fix filter for the value zero (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
autoantwort authored Sep 25, 2023
1 parent d1ad13b commit e2fe064
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rangefilter/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,9 +344,9 @@ def _make_query_filter(self, _request, validated_data):
value_gte = validated_data.get(self.lookup_kwarg_gte, None)
value_lte = validated_data.get(self.lookup_kwarg_lte, None)

if value_gte:
if value_gte is not None:
query_params["{0}__gte".format(self.field_path)] = value_gte
if value_lte:
if value_lte is not None:
query_params["{0}__lte".format(self.field_path)] = value_lte

return query_params
Expand Down

0 comments on commit e2fe064

Please sign in to comment.