From: Magnus Hagander Date: Thu, 12 Feb 2009 16:06:00 +0000 (+0100) Subject: Don't try to validate initialclone if it doesn't exist X-Git-Url: http://git.postgresql.org/gitweb/static/benefitdownload/file?a=commitdiff_plain;h=c6900cd4293dc103e749f9395cd72bb67d368ba2;p=pggit.git Don't try to validate initialclone if it doesn't exist --- diff --git a/gitadmin/adm/views.py b/gitadmin/adm/views.py index 7a6dafc..c786c46 100644 --- a/gitadmin/adm/views.py +++ b/gitadmin/adm/views.py @@ -73,7 +73,7 @@ def editrepo(request, repoid): if form.is_valid() and formset.is_valid(): try: # Manually validate the repository entered if there is one to clone - if form.cleaned_data['initialclone']: + if form.cleaned_data.has_key('initialclone') and form.cleaned_data['initialclone']: if form.cleaned_data['initialclone'].startswith('git://'): # Validate hostnames and stuff? pass