X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/3d1fb545dd1f49e0624d3adf20e5568b1c33d8ec..6431b691f2335a3c614bfe153267bc5c58add51c:/apps/api/handlers.py?ds=inline diff --git a/apps/api/handlers.py b/apps/api/handlers.py index 76de8c6a3..9bb65d00e 100644 --- a/apps/api/handlers.py +++ b/apps/api/handlers.py @@ -66,8 +66,8 @@ class CatalogueHandler(BaseHandler): elif field in ('mp3', 'ogg', 'daisy'): media = [] - for m in book.medias.filter(type=''): - files.append({ + for m in book.media.filter(type=field): + media.append({ 'url': m.file.get_absolute_url(), 'size': m.file.size, })