What steps will reproduce the problem?
1. Using django-cashflow to create new account.
What is the expected output? What do you see instead?
Expected: Create successfully.
Real: decimal.InvalidOperation: Invalid literal for Decimal: ''
What version of the product are you using? On what operating system?
contrib.Money r5
Ubuntu 8.10
Solution: in Money.py:
115 def __eq__(self, other):
116 if isinstance(other, Money):
117 return (self.amount == other.amount) and (self.currency ==
other.currency)
118 #return (self.amount == Decimal(str(other)))
119 return (self.amount == Decimal(str(other or 0))) # use it
instead to avoid error when other=''
Original issue reported on code.google.com by tuanope...@gmail.com on 31 May 2009 at 4:01
Original issue reported on code.google.com by
tuanope...@gmail.com
on 31 May 2009 at 4:01