This is an automated email from the ASF dual-hosted git repository.

maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 5e66008  Add handling for memoryview (#6987)
5e66008 is described below

commit 5e66008ba1520a21df7b962ffb3943b539d389ba
Author: Ville Brofeldt <[email protected]>
AuthorDate: Fri Mar 15 07:35:40 2019 +0200

    Add handling for memoryview (#6987)
---
 superset/utils/core.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/superset/utils/core.py b/superset/utils/core.py
index 0edd6e5..022e9c5 100644
--- a/superset/utils/core.py
+++ b/superset/utils/core.py
@@ -340,6 +340,8 @@ def base_json_conv(obj):
         return str(obj)
     elif isinstance(obj, timedelta):
         return str(obj)
+    elif isinstance(obj, memoryview):
+        return str(obj.tobytes(), 'utf8')
     elif isinstance(obj, bytes):
         try:
             return '{}'.format(obj)

Reply via email to