boobank: never convert a float to decimal

Signed-off-by: Pierre Mazière <pierre.maziere@gmail.com>
This commit is contained in:
Pierre Mazière 2012-04-18 00:31:36 +02:00 committed by Romain Bignon
commit 8d13282dab

View file

@ -108,7 +108,7 @@ class AccountListFormatter(IFormatter):
result = (u' %s%-' + (u'15' if alias is not None else '30') + u's%s %-25s %8s %8s') % \
(self.BOLD, id, self.NC,
obj.label, '%.2f' % obj.balance, '%.2f' % (obj.coming or Decimal(0.0)))
obj.label, '%.2f' % obj.balance, '%.2f' % (obj.coming or Decimal(0)))
self.tot_balance += obj.balance
if obj.coming: