# HG changeset patch # User Marcin Kuzminski # Date 2018-02-20 14:10:01 # Node ID 11d0d959c296db244326cb90f76b134e67fadf86 # Parent ae76df4c412579d31b08d1815d6b6be719f20f37 visual-settings: fill in default clone/ssh clone urls if they aren't provided. - people tend to not know what should be the proper value. Let's fill in the defaults for them diff --git a/rhodecode/model/forms.py b/rhodecode/model/forms.py --- a/rhodecode/model/forms.py +++ b/rhodecode/model/forms.py @@ -375,6 +375,7 @@ def ApplicationSettingsForm(localizer): def ApplicationVisualisationForm(localizer): + from rhodecode.model.db import Repository _ = localizer class _ApplicationVisualisationForm(formencode.Schema): @@ -392,8 +393,8 @@ def ApplicationVisualisationForm(localiz rhodecode_use_gravatar = v.StringBoolean(if_missing=False) rhodecode_markup_renderer = v.OneOf(['markdown', 'rst']) rhodecode_gravatar_url = v.UnicodeString(min=3) - rhodecode_clone_uri_tmpl = v.UnicodeString(min=3) - rhodecode_clone_uri_ssh_tmpl = v.UnicodeString(min=3) + rhodecode_clone_uri_tmpl = v.UnicodeString(not_empty=False, if_empty=Repository.DEFAULT_CLONE_URI) + rhodecode_clone_uri_ssh_tmpl = v.UnicodeString(not_empty=False, if_empty=Repository.DEFAULT_CLONE_URI_SSH) rhodecode_support_url = v.UnicodeString() rhodecode_show_revision_number = v.StringBoolean(if_missing=False) rhodecode_show_sha_length = v.Int(min=4, not_empty=True)