1
0
mirror of https://github.com/Mailu/Mailu.git synced 2025-03-03 14:52:36 +02:00

Merge pull request #839 from hoellen/fix-create-onupdate-default

fix default value for created_at and updated_at
This commit is contained in:
hoellen 2019-01-16 12:11:13 +01:00 committed by GitHub
commit 6dea8b422a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -101,8 +101,8 @@ class Base(db.Model):
}
)
created_at = db.Column(db.Date, nullable=False, default=datetime.now)
updated_at = db.Column(db.Date, nullable=True, onupdate=datetime.now)
created_at = db.Column(db.Date, nullable=False, default=date.today)
updated_at = db.Column(db.Date, nullable=True, onupdate=date.today)
comment = db.Column(db.String(255), nullable=True)