Skip to content

Commit

Permalink
[hotfix] handle missing or empty column type
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed Mar 15, 2017
1 parent 0674ed8 commit 4ded37e
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions superset/connectors/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 4ded37e

Please sign in to comment.