changeset 1517:142a05597cba beta

assure that we don't have an empty description when creating a repo
author Marcin Kuzminski <marcin@python-works.com>
date Fri, 07 Oct 2011 16:33:01 +0200
parents 582686d76cb6
children 5585609772d0 e11551685fd8
files rhodecode/model/repo.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/rhodecode/model/repo.py	Fri Oct 07 13:47:55 2011 +0200
+++ b/rhodecode/model/repo.py	Fri Oct 07 16:33:01 2011 +0200
@@ -192,6 +192,9 @@
                 if k == 'repo_group':
                     k = 'group_id'
 
+                if k == 'description':
+                    v = v or repo_name
+
                 setattr(new_repo, k, v)
 
             if fork:
@@ -302,7 +305,7 @@
         :param clone_uri:
         """
         from rhodecode.lib.utils import is_valid_repo
-        
+
         if new_parent_id:
             paths = Group.get(new_parent_id).full_path.split(Group.url_sep())
             new_parent_path = os.sep.join(paths)