Revert "fixed bug #728"

This reverts commit dbb86ffbbf25651330266435752a6a0422cfb6e5.

It caused bug 5469
This commit is contained in:
Boris Bobrov 2016-08-16 03:45:20 +03:00
parent cacc679a24
commit 9d935dd838

View File

@ -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')