mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-23 01:51:08 +00:00
Shelf page 500s where it should 404
This commit is contained in:
parent
6e66154e35
commit
fd6c1973cf
1 changed files with 4 additions and 1 deletions
|
@ -39,7 +39,10 @@ class Shelf(View):
|
||||||
|
|
||||||
# get the shelf and make sure the logged in user should be able to see it
|
# get the shelf and make sure the logged in user should be able to see it
|
||||||
if shelf_identifier:
|
if shelf_identifier:
|
||||||
|
try:
|
||||||
shelf = user.shelf_set.get(identifier=shelf_identifier)
|
shelf = user.shelf_set.get(identifier=shelf_identifier)
|
||||||
|
except models.Shelf.DoesNotExist:
|
||||||
|
return HttpResponseNotFound()
|
||||||
if not object_visible_to_user(request.user, shelf):
|
if not object_visible_to_user(request.user, shelf):
|
||||||
return HttpResponseNotFound()
|
return HttpResponseNotFound()
|
||||||
# this is a constructed "all books" view, with a fake "shelf" obj
|
# this is a constructed "all books" view, with a fake "shelf" obj
|
||||||
|
|
Loading…
Reference in a new issue