correctly decoding bytes to utf-8

This commit is contained in:
jinder1s
2019-09-30 11:01:31 -04:00
parent a96fcff92c
commit 61f6dabdcf

View File

@@ -237,6 +237,8 @@ class CertificateManager(object):
Deserialize from a JSON representation into a Certificate object.
'value' should be either a Certificate instance, or a valid JSON string
"""
if not six.PY2 and not isinstance(value, six.integer_types):
value = value.decode('utf-8')
# Ensure the schema fieldset meets our expectations
for key in ("name", "description", "version"):