diff --git a/superset/connectors/base.py b/superset/connectors/base.py index bdb7852f5129a..46bc9581fedb9 100644 --- a/superset/connectors/base.py +++ b/superset/connectors/base.py @@ -117,15 +117,24 @@ def __repr__(self): @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):