[ckan-dev] package_update deletes existing information
Ian Ward
ian at excess.org
Fri Feb 7 13:26:27 UTC 2014
There's a related issue[1] where I've suggested adding a
package_update_partial action for this sort of thing. I think that's
what you're looking for.
[1]: https://github.com/ckan/ckan/issues/1416
On Fri, Feb 7, 2014 at 6:43 AM, Austlid Hilde <hilde.austlid at vegvesen.no> wrote:
> 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
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
More information about the ckan-dev
mailing list