Bugs item #1501178, was opened at 2006-06-05 15:09
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1501178&group_id=74338
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: SQLObject from repository
Status: Open
Resolution: None
Priority: 5
Submitted By: Chris Leonello (cleonello)
Assigned to: Nobody/Anonymous (nobody)
Summary: integer and float values of 0 get converted to None
Initial Comment:
There is a problem with the validation/conversion of
integer and float columns. When creating objects with
IntCol and FloatCols, values of 0 are converted to
None. String values are converted properly, however.
An example:
class test(SQLObject):
fcol=FloatCol()
icol=IntCol()
t = test(fcol=3.2, icol=1)
print t
<test 10L fcol=3.2000000000000002 icol=1>
t = test(fcol=0.0, icol=0)
print t
<test 11L fcol=None icol=None>
t = test(fcol='0.0', icol='0')
print t
<test 14L fcol=0.0 icol=0>
I am using SQLObject rev 1675, python2.4, formencode
0.5.1, postgresql 8.1.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1501178&group_id=74338
|