diff --git a/caravel/models.py b/caravel/models.py index f8f042d19c18f..fa16e7ed73ee9 100644 --- a/caravel/models.py +++ b/caravel/models.py @@ -428,10 +428,8 @@ def grains(self): if self.sqlalchemy_uri.startswith(db_type): return grains - def dttm_converter(self, dttm, tf=None): + def dttm_converter(self, dttm, tf='%Y-%m-%d %H:%M:%S.%f'): """Returns a string that the database flavor understands as a date""" - if tf is None or tf == '': - tf = '%Y-%m-%d %H:%M:%S.%f' default = "'{}'".format(dttm.strftime(tf)) iso = dttm.isoformat() d = {