From 1b2d0da90958e6385732fbea5a83e35ca67a1c29 Mon Sep 17 00:00:00 2001 From: Massimiliano Belletti Date: Thu, 26 Mar 2020 12:40:48 +0100 Subject: [PATCH] Fix typo harattr instead hasattr --- gluon/serializers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gluon/serializers.py b/gluon/serializers.py index ab1f347b..e5a181c7 100644 --- a/gluon/serializers.py +++ b/gluon/serializers.py @@ -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):