From 99c1a670f416400cf599c3833d26ee75f13e2538 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Mon, 27 Sep 2021 17:52:20 -0700 Subject: [PATCH] Fixes checking goal perms --- bookwyrm/views/goal.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bookwyrm/views/goal.py b/bookwyrm/views/goal.py index 1a0a99bf..105c8b90 100644 --- a/bookwyrm/views/goal.py +++ b/bookwyrm/views/goal.py @@ -31,7 +31,8 @@ class Goal(View): if not goal and year != timezone.now().year: return redirect("user-goal", username, current_year) - goal.raise_visible_to_user(request.user) + if goal: + goal.raise_visible_to_user(request.user) data = { "goal_form": forms.GoalForm(instance=goal),