I accidentally defined a column with Decimal instead of Float. I updated the value in models as below:
a = db.Column(db.Float(asdecimal=False)) b = db.Column(