fix possible redirect loop

pull/43/head
eric 2017-02-14 14:37:36 -05:00 committed by Raymond Yee
parent 34e87e3059
commit d735a611d1
1 changed files with 2 additions and 1 deletions

View File

@ -80,7 +80,8 @@ def widget(request, isbn):
def featured_cover(request):
work = featured_work()
return HttpResponseRedirect(work.cover_image_thumbnail())
tn = work.cover_image_thumbnail()
return HttpResponseRedirect(tn if tn else "/static/images/generic_cover_larger.png")
def featured_url(request):
work = featured_work()