Changeset - 8e87c16ac58e
[Not reviewed]
default
0 2 0
Mads Kiilerich - 10 years ago 2015-07-23 00:52:29
madski@unity3d.com
db: remove unused repository groups_choices parameter show_empty_group
2 files changed with 4 insertions and 10 deletions:
0 comments (0 inline, 0 general)
kallithea/model/db.py
Show inline comments
 
@@ -1516,22 +1516,16 @@ class RepoGroup(Base, BaseModel):
 
        from webhelpers.html import literal
 
        if repo_group is None:
 
            return (-1, u'-- %s --' % _('top level'))
 
        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):
 
        return URL_SEP
 

	
 
    @classmethod
kallithea/model/scm.py
Show inline comments
 
@@ -898,7 +898,7 @@ def AvailableRepoGroupChoices(top_perms,
 
        groups = list(RepoGroupList(groups, perm_set=repo_group_perms))
 
        if top_perms and HasPermissionAny(*top_perms)('available repo groups'):
 
            groups.append(None)
 
        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)
0 comments (0 inline, 0 general)