fix unicode bug in launch error message

This commit is contained in:
AlanCoding 2018-07-13 15:50:50 -04:00
parent 9a44f6d13d
commit e897cbd237
No known key found for this signature in database
GPG Key ID: FD2C3C012A72926B
2 changed files with 2 additions and 2 deletions

View File

@ -4294,7 +4294,7 @@ class JobLaunchSerializer(BaseSerializer):
errors.setdefault('credentials', []).append(_(
'Removing {} credential at launch time without replacement is not supported. '
'Provided list lacked credential(s): {}.'
).format(cred.unique_hash(display=True), ', '.join([str(c) for c in removed_creds])))
).format(cred.unique_hash(display=True), ', '.join([six.text_type(c) for c in removed_creds])))
# verify that credentials (either provided or existing) don't
# require launch-time passwords that have not been provided

View File

@ -419,7 +419,7 @@ class Credential(PasswordFieldsModel, CommonModelNameNotUnique, ResourceMixin):
else:
fmt_str = six.text_type('{}_{}')
return fmt_str.format(type_alias, self.inputs.get('vault_id'))
return str(type_alias)
return six.text_type(type_alias)
@staticmethod
def unique_dict(cred_qs):