let FloatValue always correspond to True
git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@3322 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
d82704e17e
commit
eaad1ce9bd
1 changed files with 4 additions and 0 deletions
|
@ -118,6 +118,10 @@ class BaseObject(object):
|
|||
|
||||
|
||||
class FloatValue(float):
|
||||
# TODO: rename to CurrencyValue
|
||||
|
||||
def __nonzero__(self):
|
||||
return True # even when value is 0.0
|
||||
|
||||
def __init__(self, value, decimals=2, currency=u'€'):
|
||||
self.decimals = decimals
|
||||
|
|
Loading…
Add table
Reference in a new issue