[payments] force amount to be a Decimal

This commit is contained in:
Benjamin Dauvergne 2012-10-03 22:38:21 +02:00
parent ab3b99cebf
commit c1ed2ecfdb
1 changed files with 1 additions and 0 deletions

View File

@ -224,6 +224,7 @@ class PaymentWorkflowStatusItem(WorkflowStatusItem):
vars = get_publisher().substitutions.get_context_variables()
vars['Decimal'] = Decimal
amount = eval(self.amount[1:], vars)
amount = Decimal(amount)
# XXX: catch and report the error somehow
return amount