Fix default for Operation.

This commit is contained in:
Alexis Lahouze 2015-09-26 15:38:57 +02:00
parent ba16a512f3
commit 5b43cd763e

View File

@ -14,6 +14,8 @@
You should have received a copy of the GNU Affero General Public License
along with Accountant. If not, see <http://www.gnu.org/licenses/>.
"""
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
)