From: Radek Czajka Date: Wed, 31 Aug 2011 10:08:44 +0000 (+0200) Subject: api media fix X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/0e793d09e4c0427fbac5e5471a35628261dd43c0?ds=inline api media fix --- diff --git a/apps/api/handlers.py b/apps/api/handlers.py index 76de8c6a3..832f34f0b 100644 --- a/apps/api/handlers.py +++ b/apps/api/handlers.py @@ -66,7 +66,7 @@ class CatalogueHandler(BaseHandler): elif field in ('mp3', 'ogg', 'daisy'): media = [] - for m in book.medias.filter(type=''): + for m in book.media.filter(type=field): files.append({ 'url': m.file.get_absolute_url(), 'size': m.file.size,