diff --git a/accountant/api/models/operations.py b/accountant/api/models/operations.py index b26eaee..fa53a72 100644 --- a/accountant/api/models/operations.py +++ b/accountant/api/models/operations.py @@ -14,6 +14,8 @@ You should have received a copy of the GNU Affero General Public License along with Accountant. If not, see . """ +from datetime import date + import arrow from sqlalchemy import func, case, desc, true, false, text @@ -28,7 +30,7 @@ class Operation(db.Model): operation_date = db.Column( db.Date, nullable=False, - default=arrow.now().date(), + default=date.today, server_default=func.current_date(), index=True )