Commit 43d2aef8 authored by Willem ter Berg's avatar Willem ter Berg

uri validation bugfix

parent aa32c4f2
......@@ -26,12 +26,12 @@ def is_uri(key, data, errors, context):
if isinstance(value, list):
for uri in value:
if not _valid_uri(uri):
errors[key].append('value ' + uri + 'is not a valid uri')
errors[key].append('value ' + uri + ' is not a valid uri')
return key, data, errors, context
if not _valid_uri(value):
errors[key].append('value ' + value + 'is not a valid uri')
errors[key].append('value ' + value + ' is not a valid uri')
return key, data, errors, context
......@@ -45,4 +45,4 @@ def _valid_uri(uri):
"""
parsed = urlparse(uri)
return all([parsed.scheme, parsed.netloc, parsed.path])
return all([parsed.scheme, parsed.netloc])
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment