From 8d643dc4596eb81c5d6b4b78d05468d8ae71884f Mon Sep 17 00:00:00 2001 From: Matthew Jones Date: Mon, 6 Feb 2017 14:00:57 -0500 Subject: [PATCH] Fix an issue not properly parsing the url port of the tower host When attempting to determine the proper url for URLField --- awx/conf/fields.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/conf/fields.py b/awx/conf/fields.py index bd2e047ae7..13d80ae937 100644 --- a/awx/conf/fields.py +++ b/awx/conf/fields.py @@ -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)