diff options
Diffstat (limited to '')
-rw-r--r-- | model.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -72,7 +72,7 @@ class ConstExpense (Expense): next = OneToOne('ConstExpense', inverse = 'prev') prev = ManyToOne('ConstExpense') - monthly = ColumnProperty(lambda c: c.expense / c.months, deferred = True) + monthly = ColumnProperty(lambda c: sql.cast(c.expense / c.months, T.Numeric(scale = 2)), deferred = True) start_year = ColumnProperty(lambda c: sql.extract('year', c.start)) start_month = ColumnProperty(lambda c: sql.extract('month', c.start)) |