Commit fcbd7c9c authored by impfundev's avatar impfundev

fix: filter upcoming loans without return date

parent dbcf75d9
...@@ -22,9 +22,9 @@ def index(request): ...@@ -22,9 +22,9 @@ def index(request):
due_date_treshold = now.today() + timedelta(days=3) due_date_treshold = now.today() + timedelta(days=3)
upcoming_loans = BookLoans.objects.filter(due_date__lte=due_date_treshold).filter( upcoming_loans = BookLoans.objects.filter(
due_date__gte=now.today() due_date__lte=due_date_treshold, return_date=None
) ).filter(due_date__gte=now.today())
context = { context = {
"login_histories": latest_login_history, "login_histories": latest_login_history,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment