diff --git a/bookwyrm/views/user.py b/bookwyrm/views/user.py index d2c9c2eb..d666f064 100644 --- a/bookwyrm/views/user.py +++ b/bookwyrm/views/user.py @@ -80,7 +80,7 @@ class User(View): goal = models.AnnualGoal.objects.filter( user=user, year=timezone.now().year ).first() - if not goal.visible_to_user(request.user): + if goal and not goal.visible_to_user(request.user): goal = None data = { "user": user,