Mercurial > kallithea
comparison rhodecode/lib/base.py @ 1530:04027bdb876c beta
Refactoring of model get functions
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sat, 08 Oct 2011 02:02:25 +0200 |
parents | 66f03a87141c |
children | 6f06daeed294 59ae82850e76 bdb6fbc8265f |
comparison
equal
deleted
inserted
replaced
1529:0b268dd369ec | 1530:04027bdb876c |
---|---|
65 | 65 |
66 def __before__(self): | 66 def __before__(self): |
67 super(BaseRepoController, self).__before__() | 67 super(BaseRepoController, self).__before__() |
68 if c.repo_name: | 68 if c.repo_name: |
69 | 69 |
70 c.rhodecode_db_repo = Repository.by_repo_name(c.repo_name) | 70 c.rhodecode_db_repo = Repository.get_by_repo_name(c.repo_name) |
71 c.rhodecode_repo = c.rhodecode_db_repo.scm_instance | 71 c.rhodecode_repo = c.rhodecode_db_repo.scm_instance |
72 | 72 |
73 if c.rhodecode_repo is None: | 73 if c.rhodecode_repo is None: |
74 log.error('%s this repository is present in database but it ' | 74 log.error('%s this repository is present in database but it ' |
75 'cannot be created as an scm instance', c.repo_name) | 75 'cannot be created as an scm instance', c.repo_name) |