Fix a bug with default datetime in models

This commit is contained in:
Lucas Verney 2017-01-16 17:36:53 +01:00
parent 5ab4342090
commit 736a5ae44f

View File

@ -10,7 +10,7 @@ class ModuleStatus(peewee.Model):
module = peewee.CharField(max_length=255) # Module name module = peewee.CharField(max_length=255) # Module name
origin = peewee.CharField(max_length=255) # Origin of the update origin = peewee.CharField(max_length=255) # Origin of the update
datetime = peewee.DateTimeField( datetime = peewee.DateTimeField(
default=arrow.utcnow().replace(microsecond=0).datetime) default=lambda: arrow.utcnow().replace(microsecond=0).datetime)
is_good = peewee.BooleanField() # True if good, False if bad is_good = peewee.BooleanField() # True if good, False if bad
class Meta: class Meta: