You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2014/02/13 19:10:48 UTC

git commit: [#6677] sort my_projects, by last_updated

Updated Branches:
  refs/heads/master 63514760c -> ea28b132a


[#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/master
Commit: ea28b132aad8c00dc9b9cb89e05524787ab7875d
Parents: 6351476
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Thu Feb 13 18:09:39 2014 +0000
Committer: Dave Brondsema <db...@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):
         """