Fix typo harattr instead hasattr
This commit is contained in:
1 parent
0e6cc87c8b
commit
1b2d0da909
1 file changed
+1
-1
@@ -84,7 +84,7 @@ def custom_json(o):
|
|||||||
elif isinstance(o, decimal.Decimal):
|
elif isinstance(o, decimal.Decimal):
|
||||||
return float(o)
|
return float(o)
|
||||||
elif isinstance(o, (bytes, bytearray)):
|
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):
|
elif isinstance(o, lazyT):
|
||||||
return str(o)
|
return str(o)
|
||||||
elif isinstance(o, XmlComponent):
|
elif isinstance(o, XmlComponent):
|
||||||
|
|||||||
Reference in new issue
Block a user