nitish6174 / openchemvault

Framework to build chemistry logfile data repository and access it through web
3 stars 6 forks source link

Get data of file API not working #3

Closed nitish6174 closed 7 years ago

nitish6174 commented 7 years ago

The POST API : /api/file/ fails when some of the values in attributes are "nan".

Need to handle the NaN case

nitish6174 commented 7 years ago

Fixed this (as part of commit #3712c7d) using:

import simplejson
jsonify(json.loads(simplejson.dumps(d, ignore_nan=True)))

in place of

jsonify(d)

This converts NaN into JSON-compatible null