Fix an issue not properly parsing the url port of the tower host

When attempting to determine the proper url for URLField
This commit is contained in:
Matthew Jones 2017-02-06 14:00:57 -05:00
parent 1cbbb6a87c
commit 8d643dc459

View File

@ -52,7 +52,7 @@ class URLField(CharField):
if url_parts.hostname and '.' not in url_parts.hostname:
netloc = '{}.local'.format(url_parts.hostname)
if url_parts.port:
netloc = '{}:{}'.format(netloc, port)
netloc = '{}:{}'.format(netloc, url_parts.port)
if url_parts.username:
if url_parts.password:
netloc = '{}:{}@{}' % (url_parts.username, url_parts.password, netloc)