[ckan-dev] package_update deletes existing information

Stéphane Guidoin stephane at opennorth.ca
Fri Feb 7 14:41:52 UTC 2014


+1 It would be great to have an equivalent action as HTTP PATCH.

There is an ongoing thread about the same topic for resources:
https://lists.okfn.org/pipermail/ckan-dev/2014-February/006755.html

Steph


On Fri, Feb 7, 2014 at 8:26 AM, Ian Ward <ian at excess.org> wrote:

> 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
> _______________________________________________
> 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
>



-- 
Stéphane Guidoin
Director, Transportation
Open North
514-862-0084
http://opennorth.ca
Twitter: @opennorth / @hoedic
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20140207/239306c0/attachment-0003.html>


More information about the ckan-dev mailing list