Fix typo harattr instead hasattr

This commit is contained in:
Massimiliano Belletti
2020-03-26 12:40:48 +01:00
parent 0e6cc87c8b
commit 1b2d0da909
+1 -1
View File
@@ -84,7 +84,7 @@ def custom_json(o):
elif isinstance(o, decimal.Decimal):
return float(o)
elif isinstance(o, (bytes, bytearray)):
return str(o) if harattr(str, 'decode') else str(o, encoding='utf-8')
return str(o) if hasattr(str, 'decode') else str(o, encoding='utf-8')
elif isinstance(o, lazyT):
return str(o)
elif isinstance(o, XmlComponent):