mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-23 16:40:36 +00:00
Show shelf buttons appropriate for current user.
This commit is contained in:
parent
ea735fd570
commit
778ce91f91
1 changed files with 2 additions and 2 deletions
|
@ -84,7 +84,7 @@ def shelve_button_identifier(context, book):
|
||||||
''' check what shelf a user has a book on, if any '''
|
''' check what shelf a user has a book on, if any '''
|
||||||
try:
|
try:
|
||||||
shelf = models.ShelfBook.objects.get(
|
shelf = models.ShelfBook.objects.get(
|
||||||
shelf__user=context['user'],
|
shelf__user=context['request'].user,
|
||||||
book=book
|
book=book
|
||||||
)
|
)
|
||||||
except models.ShelfBook.DoesNotExist:
|
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 '''
|
''' check what shelf a user has a book on, if any '''
|
||||||
try:
|
try:
|
||||||
shelf = models.ShelfBook.objects.get(
|
shelf = models.ShelfBook.objects.get(
|
||||||
shelf__user=context['user'],
|
shelf__user=context['request'].user,
|
||||||
book=book
|
book=book
|
||||||
)
|
)
|
||||||
except models.ShelfBook.DoesNotExist:
|
except models.ShelfBook.DoesNotExist:
|
||||||
|
|
Loading…
Reference in a new issue