From 6bea6e8c1db99c6ed22cdc010ec2552fd473a649 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Mon, 12 Sep 2011 06:06:05 +0200 Subject: [PATCH] media in api fix --- apps/api/handlers.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/api/handlers.py b/apps/api/handlers.py index bd44e57a8..508659e75 100644 --- a/apps/api/handlers.py +++ b/apps/api/handlers.py @@ -147,6 +147,12 @@ class BooksHandler(BaseHandler): else: return rc.NOT_FOUND + @classmethod + def media(self, book): + """ Returns all media for a book. """ + + return book.media.all() + # add categorized tags fields for Book def _tags_getter(category): -- 2.20.1