[ckan-dev] package_update deletes existing information
Austlid Hilde
hilde.austlid at vegvesen.no
Fri Feb 7 11:43:44 UTC 2014
Hi,
If I use the API to update entries, I find that some existing information is deleted. For instance, if I use package_update to change the title of a package, I lose all resources, existing tags, and extra fields for that package, but keep description, license, maintainer, and author.
The brute force solution is, of course, to read all existing information when I want to do an update, and then add it back together with the new information. Is there a better solution?
Also, is this a bug which I should report on https://github.com/ckan/ckan/issues , or is there a reason for it to be this way?
Background info:
I use a python script based on the example on http://docs.ckan.org/en/latest/api/index.html#example-importing-datasets-with-the-ckan-api
I only have dictionary entries for the fields I want to touch. For instance, when I update a title, my dataset_dict = {'name': 'test_package', 'title': 'New title'}
I'm running CKAN 2.2, and using the latest version of the API.
Regards,
Hilde
More information about the ckan-dev
mailing list