From 778ce91f9167fb641eac9483776a10170e7fabe1 Mon Sep 17 00:00:00 2001 From: Adam Kelly Date: Fri, 27 Mar 2020 14:50:38 +0000 Subject: [PATCH] Show shelf buttons appropriate for current user. --- fedireads/templatetags/fr_display.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fedireads/templatetags/fr_display.py b/fedireads/templatetags/fr_display.py index b34fc9f6..b3c4ad80 100644 --- a/fedireads/templatetags/fr_display.py +++ b/fedireads/templatetags/fr_display.py @@ -84,7 +84,7 @@ def shelve_button_identifier(context, book): ''' check what shelf a user has a book on, if any ''' try: shelf = models.ShelfBook.objects.get( - shelf__user=context['user'], + shelf__user=context['request'].user, book=book ) except models.ShelfBook.DoesNotExist: @@ -102,7 +102,7 @@ def shelve_button_text(context, book): ''' check what shelf a user has a book on, if any ''' try: shelf = models.ShelfBook.objects.get( - shelf__user=context['user'], + shelf__user=context['request'].user, book=book ) except models.ShelfBook.DoesNotExist: