# HG changeset patch # User Marcin Kuzminski # Date 2011-05-25 23:48:29 # Node ID e0f670b987eb2e6edbd92808d23a8e5854cd7655 # Parent eb489bf9d7c7ba39ca2e8d972ace6e77d565fa78 Small cache fixes. diff --git a/rhodecode/lib/base.py b/rhodecode/lib/base.py --- a/rhodecode/lib/base.py +++ b/rhodecode/lib/base.py @@ -62,7 +62,8 @@ class BaseRepoController(BaseController) super(BaseRepoController, self).__before__() if c.repo_name: - c.rhodecode_repo, dbrepo = self.scm_model.get(c.repo_name, retval='repo') + c.rhodecode_repo, dbrepo = self.scm_model.get(c.repo_name, + retval='repo') if c.rhodecode_repo is not None: c.repository_followers = \ diff --git a/rhodecode/model/repo.py b/rhodecode/model/repo.py --- a/rhodecode/model/repo.py +++ b/rhodecode/model/repo.py @@ -74,6 +74,7 @@ class RepoModel(BaseModel): repo = self.sa.query(Repository)\ .options(joinedload(Repository.fork))\ .options(joinedload(Repository.user))\ + .options(joinedload(Repository.group))\ .filter(Repository.repo_name == repo_name)\ if cache: @@ -86,7 +87,7 @@ class RepoModel(BaseModel): #make transient for sake of errors make_transient(ret) - for k in ['fork', 'user']: + for k in ['fork', 'user', 'group']: attr = getattr(ret, k, False) if attr: make_transient(attr)