Closed AlexHuang2 closed 3 years ago
Hi,
Thanks for pointing this one out.
I'll look into patching this.
br
A new version of the package is uploaded to PyPI, please update using:
pip install pyadomd --upgrade
Again thx for raising this - closing the issue
In
_type_code.py
, the function_option_type
evaluates toNone
for, say,_option_type(datatype=float, data=0)
. This is generally incorrect--even thoughbool(0)
evaluates toFalse
for numeric 0s--as 0 is a valid value for float, and numeric fields in general. The same applies to howadomd_type_map
is mappingSystem.Decimal
as that is also a numeric field.My proposed changes in
_type_code.py
are as follows:to
_option_type
:to
adomd_type_map
:but I'm not sure this is the canonical "developer way" of doing it, so I will just leave this here.