Update models.py

Minor style fix
This commit is contained in:
Josh Walters
2016-05-24 12:48:45 -07:00
parent 7360fd2e86
commit 6897c388e0

View File

@@ -428,10 +428,8 @@ class Database(Model, AuditMixinNullable):
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 = {