From 9d935dd838eb7bde958d7b36064334b9b6e64102 Mon Sep 17 00:00:00 2001 From: Boris Bobrov Date: Tue, 16 Aug 2016 03:45:20 +0300 Subject: [PATCH] Revert "fixed bug #728" This reverts commit dbb86ffbbf25651330266435752a6a0422cfb6e5. It caused bug 5469 --- mediagoblin/db/models.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mediagoblin/db/models.py b/mediagoblin/db/models.py index 0a20278f..f4644b9f 100644 --- a/mediagoblin/db/models.py +++ b/mediagoblin/db/models.py @@ -1162,11 +1162,11 @@ class Collection(Base, CollectionMixin, CommentingMixin): def get_collection_items(self, ascending=False): #TODO, is this still needed with self.collection_items being available? - order_col = MediaEntry.created + order_col = CollectionItem.position if not ascending: order_col = desc(order_col) - return CollectionItem.query.join(MediaEntry).filter( - CollectionItem.collection==self.id).order_by(order_col) + return CollectionItem.query.filter_by( + collection=self.id).order_by(order_col) def __repr__(self): safe_title = self.title.encode('ascii', 'replace') -- 2.25.1