[ckan-dev] Problem removing datasets from a group through API

Jaakko Louhio jaakko.louhio at floapps.com
Tue Apr 3 12:20:56 UTC 2012


I'm using CKAN version tagged ckan-1.6 at the github.com/okfn/ckan.

On Tue, 03 Apr 2012 15:08:51 +0300, Sean Hammond <sean.hammond at okfn.org>  
wrote:

>> Hello,
>> I ran into following issue today.
>>
>> Whenever I add datasets to a Group, lets call it 'mygroup', using
>> API v2 it works fine, but when I try to remove datasets from a
>> group, there are some issues. When I go to /group it shows the right
>> amount of datasets in group listing. But, at /group/mygroup also
>> shows those groups I just removed.
>>
>> Here is step by step what I did.
>> - I POSTed json: {'packages': ['pkg_id1', 'pkg_id2']} to my
>> controller (group_id I'll get from GET -parameters) which in turn
>> calls api.update(register='group', ver=2, id=group_id). This added
>> datasets to 'mygroup' and everything was fine upon inspection.
>> - Now, I did the same thing as previously, but my json was as
>> follows: {'packages': ['pkg_id2']}. This should have, in theory
>> removed, 'pkg_id1' from mygroup.
>> - /group listed 'mygroup' as having 1 dataset. But, /group/mygroup
>> listed both datasets I first added to 'mygroup'. Also, edit of
>> 'pkg_id1' shows that it belongs to 'mygroup', but allows adding
>> dataset to that group again as if it did not belong to 'mygroup'.
>
> I'm not able to reproduce this behaviour using the latest development
> version of CKAN (i.e. the current HEAD commit on the master branch at
> github.com/okfn/ckan). Adding/removing datasets to/from groups with
> APIv2 appears to work fine. What version of CKAN are you using?
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev




More information about the ckan-dev mailing list