From fc31b3e0b054cbba19e661986716ae30577fcec7 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Thu, 1 Apr 2021 14:22:01 -0700 Subject: [PATCH] Fixes invite requests page with no filters --- bookwyrm/views/invite.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bookwyrm/views/invite.py b/bookwyrm/views/invite.py index 0be48675e..665f98ce7 100644 --- a/bookwyrm/views/invite.py +++ b/bookwyrm/views/invite.py @@ -119,9 +119,10 @@ class ManageInviteRequests(View): if "accepted" in status_filters: filters.append({"invite__isnull": False, "invite__times_used__gte": 1}) - requests = requests.filter( - reduce(operator.or_, (Q(**f) for f in filters)) - ).distinct() + if filters: + requests = requests.filter( + reduce(operator.or_, (Q(**f) for f in filters)) + ).distinct() paginated = Paginator( requests,