forked from mirrors/bookwyrm
Update annual_summary.py
This commit is contained in:
parent
29b688b68d
commit
fd8423b73c
1 changed files with 2 additions and 2 deletions
|
@ -24,7 +24,7 @@ LAST_DAY = 15
|
||||||
class AnnualSummary(View):
|
class AnnualSummary(View):
|
||||||
"""display a summary of the year for the current user"""
|
"""display a summary of the year for the current user"""
|
||||||
|
|
||||||
def get(self, request, username, year):
|
def get(self, request, username, year): # pylint: disable=too-many-locals
|
||||||
"""get response"""
|
"""get response"""
|
||||||
|
|
||||||
user = get_user_from_username(request.user, username)
|
user = get_user_from_username(request.user, username)
|
||||||
|
@ -219,7 +219,7 @@ def get_goal_status(user, year):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
goal = models.AnnualGoal.objects.get(user=user, year=year)
|
goal = models.AnnualGoal.objects.get(user=user, year=year)
|
||||||
except:
|
except ObjectDoesNotExist:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
if goal.privacy != "public":
|
if goal.privacy != "public":
|
||||||
|
|
Loading…
Reference in a new issue