diff pylons_app/model/hg_model.py @ 477:fdebc5f67dc6 celery

Some gui fixes
author Marcin Kuzminski <marcin@python-works.com>
date Tue, 14 Sep 2010 17:34:15 +0200
parents 6b934c9607e7
children 7afbc45aab28
line wrap: on
line diff
--- a/pylons_app/model/hg_model.py	Mon Sep 13 13:02:20 2010 +0200
+++ b/pylons_app/model/hg_model.py	Tue Sep 14 17:34:15 2010 +0200
@@ -61,9 +61,9 @@
 @cache_region('super_short_term', 'cached_repos_switcher_list')
 def _get_repos_switcher_cached(cached_repo_list):
     repos_lst = []
-    for repo in sorted(x.name.lower() for x in cached_repo_list.values()):
-        if HasRepoPermissionAny('repository.write', 'repository.read', 'repository.admin')(repo, 'main page check'):
-            repos_lst.append(repo)
+    for repo in sorted(x for x in cached_repo_list.values()):
+        if HasRepoPermissionAny('repository.write', 'repository.read', 'repository.admin')(repo.name.lower(), 'main page check'):
+            repos_lst.append((repo.name.lower(), repo.dbrepo.private,))
     
     return repos_lst