1. Andy Mikhailenko
  2. eav-django
  3. Issues
Issue #2 new

RangeFacet incorrectly exclusive

Anonymous created an issue

Look at http://bitbucket.org/neithere/eav-django/src/tip/eav/facets.py#cl-177

if start and not stop:
    return {'%s__gt' % self.lookup_name: start}
if stop and not start:
    return {'%s__lt' % self.lookup_name: stop}
return {'%s__range' % self.lookup_name: (start or 0, stop)}

The __range condition matches inclusive range http://docs.djangoproject.com/en/dev/ref/models/querysets/#range, but __gt and __lt are exclusive. I suppose they are must be writen as __gte and __lte.

Comments (1)

  1. Log in to comment