# HG changeset patch # User Mads Kiilerich # Date 2015-07-23 00:52:29 # Node ID 8e87c16ac58e22a37b0c2b23ea650709bef980e6 # Parent 6245435fd8d77b80c1509fbbc97e77122eecfc7c db: remove unused repository groups_choices parameter show_empty_group diff --git a/kallithea/model/db.py b/kallithea/model/db.py --- a/kallithea/model/db.py +++ b/kallithea/model/db.py @@ -1519,16 +1519,10 @@ class RepoGroup(Base, BaseModel): 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 --git a/kallithea/model/scm.py b/kallithea/model/scm.py --- a/kallithea/model/scm.py +++ b/kallithea/model/scm.py @@ -901,4 +901,4 @@ def AvailableRepoGroupChoices(top_perms, 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)