1
0
Fork 0

Makes visibility evaluator a model function

This commit is contained in:
Mouse Reeve 2021-04-11 09:26:12 -07:00
parent 26f16cf5a4
commit b6a7871b04
9 changed files with 101 additions and 95 deletions

View file

@ -10,7 +10,7 @@ from django.views.decorators.http import require_POST
from bookwyrm import forms, models
from bookwyrm.status import create_generated_note
from .helpers import get_user_from_username, object_visible_to_user
from .helpers import get_user_from_username
# pylint: disable= no-self-use
@ -26,7 +26,7 @@ class Goal(View):
if not goal and user != request.user:
return HttpResponseNotFound()
if goal and not object_visible_to_user(request.user, goal):
if goal and not goal.visible_to_user(request.user):
return HttpResponseNotFound()
data = {