Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FloatField with null=True and is not imported properly when value is null unless default exists #433

Closed
dlparker opened this issue Apr 5, 2016 · 1 comment

Comments

@dlparker
Copy link

dlparker commented Apr 5, 2016

error looks like this:

restoring WeightLimits
OrderedDict([(u'id', u'4'), (u'source_doc', u'5'), (u'created', u'2016-04-05 00:07:29'), (u'modified', u'2016-04-05 00:07:29'), (u'by_user', u'legacy'), (u'units', u'us'), (u'max_takeoff_weight', u''), (u'max_fuel_load', u''), (u'max_payload', u''), (u'empty_weight', u''), (u'VFR_day_reserves', u''), (u'VFR_night_reserves', u''), (u'IFR_100nm_reserves', u'734'), (u'IFR_200nm_reserves', u'946'), (u'IFR_300nm_reserves', u'1132'), (u'NBAA_100nm_reserves', u'641'), (u'NBAA_200nm_reserves', u'851'), (u'NBAA_300nm_reserves', u'1035')]) could not convert string to float: 

where max_fuel_load is the float field. If I add "default=None" to the field declaration the error goes away. Note that several of the other fields with nulls are IntegerField and they work fine.

Tried this with both json and csv, no difference in behavior.

I have workarounds (use default or convert to integer) so it is low priority for me, others may feel differently.

@bmihelac
Copy link
Member

bmihelac commented Apr 6, 2016

this should be fixed, can you test and reopen if needed?

@bmihelac bmihelac closed this as completed Apr 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants