From a0c0894396d8ff48bbe01df6fc0484ca06179e04 Mon Sep 17 00:00:00 2001 From: Patrick Canterino Date: Sat, 5 Mar 2022 12:48:37 +0100 Subject: [PATCH] Count the *really* selected notes --- notes/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notes/views.py b/notes/views.py index d2c8bb0..2c79254 100644 --- a/notes/views.py +++ b/notes/views.py @@ -10,7 +10,7 @@ from .models import Note def note_list(request): notes = Note.objects.all() if request.user.is_staff else Note.objects.filter(status=1) - notes_count = Note.objects.filter(status=1).count() + notes_count = notes.count() paginator = Paginator(notes, NOTES_PER_PAGE) page_number = 1 -- 2.34.1