Ticket #2892 (new defect)

Opened 20 months ago

Last modified 20 months ago

IDatasetForm's form_to_db_schema() breaks API?

Reported by: seanh Owned by:
Priority: awaiting triage Milestone: ckan-v1.8.1
Component: ckan Keywords:
Cc: Repository: ckan
Theme: none

Description

It looks like when an IDatasetForm plugin with a form_to_db_schema() method is active, then the posted data dict is validated against the schema even if the user is posting to an API endpoint like /api/action/package_update etc. This breaks the API, for example 'name' and 'title' are optional keys for package_update (you can supply only the 'id'), but the schema validation will fail if either are not present in the posted dict.

It may be we need different schema for package create and package update, currently IDatasetForm has just the one form_to_db_schema() method.

Change History

comment:1 Changed 20 months ago by seanh

  • Milestone set to ckan-v1.8.1
Note: See TracTickets for help on using tickets.