Mercurial > kallithea
changeset 7797:e7ba4c0ec050
admin: in advanced settings, only show repos of same type in the select list for "Parent"
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Mon, 22 Jul 2019 04:43:45 +0200 |
parents | 509b0dca0a3a |
children | 5bfda9c04db5 |
files | kallithea/controllers/admin/repos.py kallithea/model/db.py |
diffstat | 2 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/controllers/admin/repos.py Tue Aug 06 22:07:00 2019 +0200 +++ b/kallithea/controllers/admin/repos.py Mon Jul 22 04:43:45 2019 +0200 @@ -414,7 +414,8 @@ c.repos_list = [(None, _('-- Not a fork --'))] c.repos_list += [(x.repo_id, x.repo_name) for x in read_access_repos - if x.repo_id != c.repo_info.repo_id] + if x.repo_id != c.repo_info.repo_id + and x.repo_type == c.repo_info.repo_type] defaults = { 'id_fork_of': c.repo_info.fork_id if c.repo_info.fork_id else ''
--- a/kallithea/model/db.py Tue Aug 06 22:07:00 2019 +0200 +++ b/kallithea/model/db.py Mon Jul 22 04:43:45 2019 +0200 @@ -975,7 +975,7 @@ repo_state = Column(String(255), nullable=False) clone_uri = Column(String(255), nullable=True) # FIXME: not nullable? - repo_type = Column(String(255), nullable=False) + repo_type = Column(String(255), nullable=False) # 'hg' or 'git' owner_id = Column('user_id', Integer(), ForeignKey('users.user_id'), nullable=False) private = Column(Boolean(), nullable=False) enable_statistics = Column("statistics", Boolean(), nullable=False, default=True)