1👍
✅
Replace greater than or equal to(__gte
) with less than or equal to(__lte
) in the query lookup. As shown below:
queryset = queryset.filter(next_action_date__lte=filter_date)
This will fix the issue.
0👍
There are two operators to do this one is less than or equal to(__lte)
As given below:
queryset = queryset.filter(next_action_date__lte=filter_date)
Second one is less than (__le),
This will not give the current Filter Condition
queryset = queryset.filter(next_action_date__lt=filter_date)
- How to return JSON Response correctly in joining multiple table in Django
- Django: select data from 2 models
Source:stackexchange.com