From 0e793d09e4c0427fbac5e5471a35628261dd43c0 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Wed, 31 Aug 2011 12:08:44 +0200 Subject: [PATCH 1/1] api media fix --- apps/api/handlers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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, -- 2.20.1