# HG changeset patch # User Mads Kiilerich # Date 1437605549 -7200 # Node ID 8e87c16ac58e22a37b0c2b23ea650709bef980e6 # Parent 6245435fd8d77b80c1509fbbc97e77122eecfc7c db: remove unused repository groups_choices parameter show_empty_group diff -r 6245435fd8d7 -r 8e87c16ac58e kallithea/model/db.py --- a/kallithea/model/db.py Thu Jul 23 00:52:29 2015 +0200 +++ b/kallithea/model/db.py Thu Jul 23 00:52:29 2015 +0200 @@ -1519,16 +1519,10 @@ return repo_group.group_id, literal(cls.SEP.join(repo_group.full_path_splitted)) @classmethod - def groups_choices(cls, groups, show_empty_group=True): + def groups_choices(cls, groups): """Return tuples with group_id and name as html literal.""" - - if show_empty_group: - groups = list(groups) - groups.append(None) - - choices = [cls._generate_choice(g) for g in groups] - - return sorted(choices, key=lambda c: c[1].split(cls.SEP)) + return sorted((cls._generate_choice(g) for g in groups), + key=lambda c: c[1].split(cls.SEP)) @classmethod def url_sep(cls): diff -r 6245435fd8d7 -r 8e87c16ac58e kallithea/model/scm.py --- a/kallithea/model/scm.py Thu Jul 23 00:52:29 2015 +0200 +++ b/kallithea/model/scm.py Thu Jul 23 00:52:29 2015 +0200 @@ -901,4 +901,4 @@ for extra in extras: if not any(rg == extra for rg in groups): groups.append(extra) - return RepoGroup.groups_choices(groups=groups, show_empty_group=False) + return RepoGroup.groups_choices(groups=groups)