-
Notifications
You must be signed in to change notification settings - Fork 80
Description
Seems like .filter is broken.
On relationship and on models, there are so many issues.
We should re-open issue #219, because #234 didn't resolve all the problems.
Sometimes it will simply not work, sometimes it will raise gremlin-related exception.
I Have:
from django.utils import timezone
now = timezone.now()
Being evstart and evend two datetime fields, and events a relationship to a Event model, this simple chain on a relationship shows no results:
myModel.events.filter(evstart__lte=now).filter(evend__gte=now)
Don't know why, but this one works:
myModel.events.filter(evstart__lte=now)
while the following does not:
myModel.events.filter(evend__gte=now)
There ARE event in the selected time period, this is sure.
The same filtering sometimes it works on Model instead of Relationship, but not always. With works I mean it gives expected results.
Furthermore, considering no .exclude is implemented ( #213), it's really hard to do something good.
@mhluongo, I wish I could help, I imagine you don't have much time. The project seems a bit on its own without you ;)