mirror of
https://github.com/apache/superset.git
synced 2024-09-12 00:29:39 -04:00
[hotfix] handle missing or empty column type
This commit is contained in:
parent
0674ed846c
commit
4ded37e71e
@ -117,15 +117,24 @@ class BaseColumn(AuditMixinNullable, ImportMixin):
|
||||
|
||||
@property
|
||||
def is_num(self):
|
||||
return any([t in self.type.upper() for t in self.num_types])
|
||||
return (
|
||||
self.type and
|
||||
any([t in self.type.upper() for t in self.num_types])
|
||||
)
|
||||
|
||||
@property
|
||||
def is_time(self):
|
||||
return any([t in self.type.upper() for t in self.date_types])
|
||||
return (
|
||||
self.type and
|
||||
any([t in self.type.upper() for t in self.date_types])
|
||||
)
|
||||
|
||||
@property
|
||||
def is_string(self):
|
||||
return any([t in self.type.upper() for t in self.str_types])
|
||||
return (
|
||||
self.type and
|
||||
any([t in self.type.upper() for t in self.str_types])
|
||||
)
|
||||
|
||||
|
||||
class BaseMetric(AuditMixinNullable, ImportMixin):
|
||||
|
Loading…
Reference in New Issue
Block a user