Browse Source

Fix bug in subdomain verification

When there is verification error and "reason" is present, no reply was
returned to client causing django exception:

ValueError: The view pyi2phosts.postkey.views.subdomain didn't return an
HttpResponse object.
pull/1/head
Hidden Z 10 years ago
parent
commit
6045b31350
  1. 8
      pyi2phosts/postkey/views.py

8
pyi2phosts/postkey/views.py

@ -133,10 +133,10 @@ def subdomain(request): @@ -133,10 +133,10 @@ def subdomain(request):
elif hasattr(e, 'code'):
log.warning('%s can\'t finish the request, error code: %s',
request.session['topdomain'], e.code)
return render_to_response('subdomain_http_verify_failure.html', {
'title': settings.SITE_NAME,
'code': e.code,
}, context_instance=RequestContext(request))
return render_to_response('subdomain_http_verify_failure.html', {
'title': settings.SITE_NAME,
'code': e.code,
}, context_instance=RequestContext(request))
else:
log.debug('subdomain verification success, saving host')
s = save_host(request)

Loading…
Cancel
Save