mirror of
https://github.com/apache/superset.git
synced 2024-09-12 08:39:45 -04:00
handle UUID type field (some database like postgres support UUID type field) (#889)
This commit is contained in:
parent
7c810dbd20
commit
cb23362a5b
@ -10,6 +10,7 @@ import functools
|
|||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
import numpy
|
import numpy
|
||||||
|
import uuid
|
||||||
|
|
||||||
import parsedatetime
|
import parsedatetime
|
||||||
import sqlalchemy as sa
|
import sqlalchemy as sa
|
||||||
@ -282,6 +283,8 @@ def base_json_conv(obj):
|
|||||||
return list(obj)
|
return list(obj)
|
||||||
elif isinstance(obj, decimal.Decimal):
|
elif isinstance(obj, decimal.Decimal):
|
||||||
return float(obj)
|
return float(obj)
|
||||||
|
elif isinstance(obj, uuid.UUID):
|
||||||
|
return str(obj)
|
||||||
|
|
||||||
|
|
||||||
def json_iso_dttm_ser(obj):
|
def json_iso_dttm_ser(obj):
|
||||||
|
Loading…
Reference in New Issue
Block a user