forked from mirrors/bookwyrm
Fixes a few missed calls to get_user_from_username
This commit is contained in:
parent
e6b4212e6b
commit
b9f06edc1b
4 changed files with 5 additions and 5 deletions
|
@ -91,7 +91,7 @@ class Status(View):
|
|||
def get(self, request, username, status_id):
|
||||
''' display a particular status (and replies, etc) '''
|
||||
try:
|
||||
user = get_user_from_username(username)
|
||||
user = get_user_from_username(request.user, username)
|
||||
status = models.Status.objects.select_subclasses().get(
|
||||
id=status_id, deleted=False)
|
||||
except ValueError:
|
||||
|
|
|
@ -18,7 +18,7 @@ class Goal(View):
|
|||
''' track books for the year '''
|
||||
def get(self, request, username, year):
|
||||
''' reading goal page '''
|
||||
user = get_user_from_username(username)
|
||||
user = get_user_from_username(request.user, username)
|
||||
year = int(year)
|
||||
goal = models.AnnualGoal.objects.filter(
|
||||
year=year, user=user
|
||||
|
@ -42,7 +42,7 @@ class Goal(View):
|
|||
|
||||
def post(self, request, username, year):
|
||||
''' update or create an annual goal '''
|
||||
user = get_user_from_username(username)
|
||||
user = get_user_from_username(request.user, username)
|
||||
if user != request.user:
|
||||
return HttpResponseNotFound()
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ class UserLists(View):
|
|||
page = int(request.GET.get('page', 1))
|
||||
except ValueError:
|
||||
page = 1
|
||||
user = get_user_from_username(username)
|
||||
user = get_user_from_username(request.user, username)
|
||||
lists = models.List.objects.filter(user=user).all()
|
||||
lists = privacy_filter(
|
||||
request.user, lists, ['public', 'followers', 'unlisted'])
|
||||
|
|
|
@ -11,7 +11,7 @@ class RssFeed(Feed):
|
|||
|
||||
def get_object(self, request, username):
|
||||
''' the user who's posts get serialized '''
|
||||
return get_user_from_username(username)
|
||||
return get_user_from_username(request.user, username)
|
||||
|
||||
|
||||
def link(self, obj):
|
||||
|
|
Loading…
Reference in a new issue