[ckan-dev] Querying dataset custom form fields (extras) ?

Sean Hammond sean.hammond at okfn.org
Tue Sep 17 14:53:30 UTC 2013


> I've added some custom form fields for dataset creation for an extension
> that I'm developing. One of the fields is a Unique ID, so I have to ensure
> that it doesn't already exist for any other datasets within an Organization.

I would do this in your validation schema, not in ckan.model. For
example in your IDatasetForm plugin, in your create_package_schema()
method, you can add a validator function for this unique extra key and
make sure it doesn't yet exist.




More information about the ckan-dev mailing list