From c185de4d8edb100d196b516aedd29b8ee0519ce0 Mon Sep 17 00:00:00 2001 From: Jan Szejko Date: Tue, 28 Nov 2017 10:49:39 +0100 Subject: [PATCH 1/1] correct children order in API --- src/api/handlers.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/api/handlers.py b/src/api/handlers.py index 6f7179bd5..04c56f8f1 100644 --- a/src/api/handlers.py +++ b/src/api/handlers.py @@ -122,14 +122,12 @@ class BookDetails(object): @classmethod def url(cls, book): """ Returns Book's URL on the site. """ - return WL_BASE + book.get_absolute_url() @classmethod def children(cls, book): """ Returns all children for a book. """ - - return book.children.all() + return book.children.order_by('parent_number', 'sort_key') @classmethod def media(cls, book): -- 2.20.1