unglued_epub_url should be looking only at unglued books, not all epubs

pull/1/head
Andromeda Yelton 2012-09-25 11:42:20 -04:00
parent 2e23ddfd54
commit 278a36e2f2
1 changed files with 1 additions and 1 deletions

View File

@ -2081,7 +2081,7 @@ def download(request, work_id):
unglued_ebooks = work.ebooks().filter(edition__unglued=True)
other_ebooks = work.ebooks().filter(edition__unglued=False)
unglued_epub_url = work.ebooks().filter(format='epub')[0].url if work.ebooks().filter(format='epub').count() else None
unglued_epub_url = unglued_ebooks.filter(format='epub')[0].url if unglued_ebooks.filter(format='epub').count() else None
context.update({
'unglued_ebooks': unglued_ebooks,