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
Downloading data with null value as JSON causes an Internal Server Error #7037
Comments
Hi @wardi @bpeXX , should we allow users to upload files with But I found that when downloading a resource in json format, this query runs. I found that when concatenating with the We can have a different approach where we can replace the @wardi, I'd like to know your opinion on this. |
Hi @bpeXX - Just wondering if you tested this issue with CKAN 2.9 (2.9.5 or master)? |
Hi @kowh-ai, unfortunately I did not test the issue with CKAN 2.9 since our application is based on CKAN 2.8.4. |
@bpeXX @kowh-ai I am having the same issue on CKAN 2.9.7 |
CKAN version
2.8.4 and 2.8.10
Describe the bug
When downloading data (which is stored in the datastore) as JSON, an internal server error occurs if the data contains a null value. The error occurs when each row has at least one column with a null value.
Steps to reproduce
The bug can be reproduced via ckan API:
with body form data: package_id (ID of an existing dataset) and name (name of resource)
with body raw data:
{ "resource_id": "54317d3a-3a26-4911-911d-57c615639756", "force": "true", "fields": [ { "id": "id", "type": "numeric" }, { "id": "name", "type": "text" } ], "primary_key": "id", "records": [ { "id": "1", "name": null } ] }
Expected behavior
A download should be possible without error. In this particular case the resulting json file will be empty. (In case of multiple rows of data, ckan already ignors the rows with null values and downloads the rest of data successfully.)
Additional details
Stack trace:
The text was updated successfully, but these errors were encountered: