[ckan-dev] Adding custom metadata in stage 3 (IDatasetForm)

Hendrik Bunke bunke.hendrik at gmail.com
Mon May 13 10:18:00 UTC 2013


--On 2013-05-10 14:08, Sean Hammond wrote:
> > In the meantime I've done some more debugging and finally found the
> > reason. If on stage 1 the field get's no value, it is stored as
> > 'MissingObject'. This value does not get overwritten in stage 3,
> > even if the user gives a new (real) value. Depending on the
> > validator ('ignore_missing' in my case) the key is deleted in the
> > end.
> 
> Can you report this as a github issue please? This sounds like a bug
> that we should fix
> 
> > Is there really no way to add custom optional metadata in stage
> > 3?
> 
> Yes, example_idatasetform does do this, it adds a field called
> country_code to stage 3 of the dataset form. It uses convert_to_tags
> though, not convert_to_extras, so I wonder if the problem you're having
> only happens with convert_to_extras.

At first I thought the example has the same problem, but I was
wrong. I just did some more research, and it seems, that storing
custom metadata actually works if you have it *only* in stage 3. My form
stores metadata in stage 1 *and* stage 2. As soon as metadata is
stored to extras in stage 1, nothing gets stored in stage 3.

Can anyone confirm this? I'd then report this as an issue.

regards
hendrik

-- 
Dr. Hendrik Bunke
http://gplus.to/hbunke
http://twitter.com/hbunke
http://www.hbxt.org




More information about the ckan-dev mailing list