Change column to longtext (#8739)

* Change column to longtext

* Manual merge heads
This commit is contained in:
Beto Dealmeida
2019-12-04 11:24:23 -08:00
committed by GitHub
parent a94464b9c9
commit 5b934bb377
4 changed files with 113 additions and 54 deletions

View File

@@ -259,13 +259,18 @@ class TableSchema(Model, AuditMixinNullable, ExtraJSONMixin):
expanded = Column(Boolean, default=False)
def to_dict(self):
try:
description = json.loads(self.description)
except json.JSONDecodeError:
description = None
return {
"id": self.id,
"tab_state_id": self.tab_state_id,
"database_id": self.database_id,
"schema": self.schema,
"table": self.table,
"description": json.loads(self.description),
"description": description,
"expanded": self.expanded,
}