mirror of
https://github.com/ZwareBear/awx.git
synced 2026-04-03 22:51:48 -05:00
AC-1201 Fix UnicodeEncodeError when validating hostname:port containing unicode.
This commit is contained in:
@@ -771,7 +771,7 @@ class HostSerializer(BaseSerializerWithVariables):
|
||||
if port < 1 or port > 65535:
|
||||
raise ValueError
|
||||
except ValueError:
|
||||
raise serializers.ValidationError('Invalid port specification: %s' % str(port))
|
||||
raise serializers.ValidationError(u'Invalid port specification: %s' % unicode(port))
|
||||
return name, port
|
||||
|
||||
def validate_name(self, attrs, source):
|
||||
|
||||
Reference in New Issue
Block a user