[ckan-dev] Problem setting Licence and Spatial values via API

Aaron McGlinchy McGlinchyA at landcareresearch.co.nz
Tue Apr 7 21:23:01 UTC 2015


We are using the API to create a new datatset and load some resources.

There are a couple of things causing us problems:
1) we have established some licence choices for users in a json file, so via the web interface they appear in the drop down.  When we set the licences field value via the API the value looks like it has been set, but unlike when created via the web UI the licence text on the lower left side is not hyperlinked to the licence details. AND, when we go manage the dataset the value that we had set for licence reverts to another value (the first choice in the licence 'list'), and when you save any edits (or even if you yourself made no changes) then the licence (potentially the wrong one the system changed back too) is 'activated' (i.e. hyperlink works) when viewing the record. Note - the value we are setting for the licence is the same as those in the 'list'.
2) Similarly, when we set a spatial 'extra' field with some (valid) geojson value, then value gets stored, but it is not 'activated' in the sense that a spatial extent widget is displayed (it is just blank), but if you mange/edit the dataset, do not make any change, and simply save ('update dataset'), then the dataset extent becomes active and the info in the spatial field is displayed correctly.

How do we 'activate' the value we set for licence and spatial from the API, and hopefully doing so will fix the issue of the licence getting changed if the dataset is managed/edited.

Thanks
Aaron


________________________________

Please consider the environment before printing this email
Warning: This electronic message together with any attachments is confidential. If you receive it in error: (i) you must not read, use, disclose, copy or retain it; (ii) please contact the sender immediately by reply email and then delete the emails.
The views expressed in this email may not be those of Landcare Research New Zealand Limited. http://www.landcareresearch.co.nz



More information about the ckan-dev mailing list