incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject [6/8] git commit: [#6677] sort my_projects, by last_updated
Date Thu, 13 Feb 2014 20:21:34 GMT
[#6677] sort my_projects, by last_updated


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/ea28b132
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/ea28b132
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/ea28b132

Branch: refs/heads/cj/7097
Commit: ea28b132aad8c00dc9b9cb89e05524787ab7875d
Parents: 6351476
Author: Dave Brondsema <dbrondsema@slashdotmedia.com>
Authored: Thu Feb 13 18:09:39 2014 +0000
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Thu Feb 13 18:09:39 2014 +0000

----------------------------------------------------------------------
 Allura/allura/model/auth.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/ea28b132/Allura/allura/model/auth.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/auth.py b/Allura/allura/model/auth.py
index 0a68146..54dcbc3 100644
--- a/Allura/allura/model/auth.py
+++ b/Allura/allura/model/auth.py
@@ -750,7 +750,7 @@ class User(MappedClass, ActivityNode, ActivityObject):
         # filter out projects to which the user belongs to no named groups (i.e., role['roles']
is empty)
         projects = [r['project_id'] for r in roles if r['roles']]
         from .project import Project
-        return Project.query.find({'_id': {'$in': projects}, 'deleted': False})
+        return Project.query.find({'_id': {'$in': projects}, 'deleted': False}).sort('last_updated',
pymongo.DESCENDING)
 
     def my_projects_by_role_name(self, role_name):
         """


Mime
View raw message