[ckan-dev] tags

Fabrizio Fornari ckanappoggio at gmail.com
Tue Mar 18 14:53:56 UTC 2014


Hi, Nigel!

As I said, I am able to update the fields I want. But, speaking about
custom_field I added few of them and I made them required fields with
"not_empty" in the validator. The point now is that, if I set them to be
required fields my package_update returns validation error for my custom
fields.

I am making the update copying the result from package_show and I guess in
this way it doesn't see that the value of my custom fields are already
there. If I use "ignore_missing" everything is fine but I would like to
make them required_field.




On Mon, Mar 17, 2014 at 11:37 AM, Fabrizio Fornari
<ckanappoggio at gmail.com>wrote:

> Thank you Nigel, that is what I was trying to do.
>
> I had to run package_show so to get the metadata, modify the ones that I
> needed and then use package_update.
>
> A package_update_partial sounds good but I understand it's not a real
> priority compared maybe with other things that can be done.
>
>
>
> On Mon, Mar 17, 2014 at 6:00 AM, Nigel Babu <nigel.babu at okfn.org> wrote:
>
>> I would recommend not calling the package_update API directly. It would
>> be better to call package_show, update the result, and then pass that into
>> package_update. There are plans to have a package_update_partial endpoint,
>> which let you make a change without pulling the whole package dict, but
>> nobody has gotten around to it.
>>
>> Nigel Babu
>>
>> Developer  |  @nigelbabu <https://twitter.com/nigelbabu>
>>
>> The Open Knowledge Foundation <http://okfn.org/>
>>
>> Empowering through Open Knowledge
>>
>> http://okfn.org/  |  @okfn <http://twitter.com/OKFN>  |  OKF on Facebook<https://www.facebook.com/OKFNetwork> |
>> Blog <http://blog.okfn.org/>  |  Newsletter<http://okfn.org/about/newsletter>
>>
>>  CKAN | http://ckan.org/ | @CKANproject <http://twitter.com/CKANproject>|the world's leading open-source data portal platform
>>
>>
>> On 15 March 2014 15:13, Fabrizio Fornari <ckanappoggio at gmail.com> wrote:
>>
>>> I managed to add tags, I was mistaking the syntax. But I would like to
>>> know how I can update the package leaving the other fields the same.
>>>
>>> If I update only the tags without specifying anything else, the result
>>> is that everything is blank excepted for the fields that I actually updated
>>> (in this case the tags). Is there a way to maintain the other fields while
>>> updating? More specifically, If I want just to add another tag to the list
>>> of tags what should I do?
>>>
>>>
>>>
>>>
>>> On Thu, Mar 13, 2014 at 6:07 PM, Fabrizio Fornari <
>>> ckanappoggio at gmail.com> wrote:
>>>
>>>> Hi guys,
>>>>
>>>> I am trying to add new tags to a package.
>>>>
>>>> I am using httpie and I am calling package_update; for fields like
>>>> author maintainer etc it's ok but I can't understand which is the syntax
>>>> for adding tags.
>>>>
>>>> What should I type to add new tags to a package?
>>>>
>>>> Thank you!
>>>>
>>>> - Fabrizio
>>>>
>>>
>>>
>>> _______________________________________________
>>> 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
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20140318/131a8fe3/attachment-0003.html>


More information about the ckan-dev mailing list