[ckan-dev] db_to_form_package_schema returns incomplete schema

Kirstein, Fabian fabian.kirstein at fokus.fraunhofer.de
Thu Jan 31 13:34:30 UTC 2013


I've created an issue on GitHub, although my description might be not that accurate. :)


-----Ursprüngliche Nachricht-----
Von: ckan-dev-bounces at lists.okfn.org [mailto:ckan-dev-bounces at lists.okfn.org] Im Auftrag von Sean Hammond
Gesendet: Freitag, 25. Januar 2013 12:49
An: ckan-dev at lists.okfn.org
Betreff: Re: [ckan-dev] db_to_form_package_schema returns incomplete schema

> Hi Sean,
> 
> I'm not pretty sure if it is a bug, because I don't really understand 
> in what ways the schema is used besides in custom form extensions. For 
> example in the default_schema the image_url of a group is missing but 
> it is part of default_group_schema.  So it seems those two schemas are 
> combined somehow normally, but not when I'm using db_to_form_schema.

db_to_form_package_schema() is _only_ used when you call it from your IDatasetForm plugin, it's not used internally by CKAN. It's purpose is to return a complete "default" package schema that you can then modify by adding your custom fields. So if there are fields that are part of packages in CKAN by default but are missing from db_to_form_package_schema(), that's a bug.

I realise this needs better documentation and examples, and also unit tests so that bugs like this one can't creep in, we're working on it.

_______________________________________________
ckan-dev mailing list
ckan-dev at lists.okfn.org
http://lists.okfn.org/mailman/listinfo/ckan-dev
Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev




More information about the ckan-dev mailing list