changeset 5293:8e87c16ac58e

db: remove unused repository groups_choices parameter show_empty_group
author Mads Kiilerich <madski@unity3d.com>
date Thu, 23 Jul 2015 00:52:29 +0200
parents 6245435fd8d7
children cd655fbd79ce
files kallithea/model/db.py kallithea/model/scm.py
diffstat 2 files changed, 4 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- 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):
--- 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)