Merge pull request #21867 from edx/msingh/python3_certificates

BOM-749: Fixing error in test_certificates.py
This commit is contained in:
Manjinder Singh
2019-09-30 11:44:44 -04:00
committed by GitHub

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 isinstance(value, bytes):
value = value.decode('utf-8')
# Ensure the schema fieldset meets our expectations
for key in ("name", "description", "version"):