unglued_epub_url should be looking only at unglued books, not all epubs
parent
2e23ddfd54
commit
278a36e2f2
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue