From ec82a60cf961c01af2b6da830da82c7a0cf3eea1 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 9 Jan 2023 01:16:10 -0500 Subject: [PATCH] 500 visiting following hom --- journal/models.py | 2 +- journal/views.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/journal/models.py b/journal/models.py index d62afe13..b2ab2f97 100644 --- a/journal/models.py +++ b/journal/models.py @@ -39,7 +39,7 @@ def q_visible_to(viewer, owner): # elif viewer.is_blocked_by(owner): # return Q(pk__in=[]) elif viewer.is_authenticated and viewer.is_following(owner): - return Q(visibility__ne=2) + return Q(visibility__in=[0, 1]) else: return Q(visibility=0) diff --git a/journal/views.py b/journal/views.py index 5277db5e..72dd4a37 100644 --- a/journal/views.py +++ b/journal/views.py @@ -468,7 +468,7 @@ def user_collection_list(request, user_name): collections = Collection.objects.filter(owner=user) if user != request.user: if request.user.is_following(user): - collections = collections.filter(visibility__ne=2) + collections = collections.filter(visibility__in=[0, 1]) else: collections = collections.filter(visibility=0) return render(