Mercurial > kallithea
diff rhodecode/controllers/admin/repos.py @ 3863:794e6eaad4aa beta
fix required repo_type param on repo edit form
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Fri, 17 May 2013 20:58:31 +0200 |
parents | 00e2c162d8bc |
children | 1aefa8d864e4 |
line wrap: on
line diff
--- a/rhodecode/controllers/admin/repos.py Tue May 14 00:07:06 2013 +0200 +++ b/rhodecode/controllers/admin/repos.py Fri May 17 20:58:31 2013 +0200 @@ -253,11 +253,15 @@ choices, c.landing_revs = ScmModel().get_repo_landing_revs(repo_name) c.landing_revs_choices = choices repo = Repository.get_by_repo_name(repo_name) - _form = RepoForm(edit=True, old_data={'repo_name': repo_name, - 'repo_group': repo.group.get_dict() \ - if repo.group else {}}, + old_data = { + 'repo_name': repo_name, + 'repo_group': repo.group.get_dict() if repo.group else {}, + 'repo_type': repo.repo_type, + } + _form = RepoForm(edit=True, old_data=old_data, repo_groups=c.repo_groups_choices, landing_revs=c.landing_revs_choices)() + try: form_result = _form.to_python(dict(request.POST)) repo = repo_model.update(repo_name, **form_result)