[ckan-changes] [okfn/ckan] ec8f69: Add default_tags_schema to form_to_db_package_sche...

GitHub noreply at github.com
Wed Feb 13 17:32:30 UTC 2013


  Branch: refs/heads/idatasetform-fixes
  Home:   https://github.com/okfn/ckan
  Commit: ec8f69ccd38240cc48a45dfde9a797624cf6c49e
      https://github.com/okfn/ckan/commit/ec8f69ccd38240cc48a45dfde9a797624cf6c49e
  Author: Sean Hammond <seanhammond at lavabit.com>
  Date:   2013-02-13 (Wed, 13 Feb 2013)

  Changed paths:
    M ckan/logic/schema.py

  Log Message:
  -----------
  Add default_tags_schema to form_to_db_package_schema

This fixes lots of "input field __junk was not expected" when running
the ckan tests with an IDatasetForm plugin active (and hence the
form_to_db package validation active).


  Commit: b6ccfca272fc14cc4fa19e8be320c2456423a986
      https://github.com/okfn/ckan/commit/b6ccfca272fc14cc4fa19e8be320c2456423a986
  Author: Sean Hammond <seanhammond at lavabit.com>
  Date:   2013-02-13 (Wed, 13 Feb 2013)

  Changed paths:
    M ckan/controllers/package.py

  Log Message:
  -----------
  [#390] Don't put api version in context when creating datasets in web ui

The form_to_db_schema() methods of IDatasetForm plugins were not getting
called when creating datasets in the web interface, if the IDatasetForm
plugin inherits from DefaultDatasetForm.

The reason was that DefaultDatasetForm's form_to_db_schema() method
deliberately doesn't call the method if the dataset is being created via
the API, and the package controller's new_resources() and new_metadata()
methods (for the new three-stage dataset creation) put the API version
in the context, so DefaultDatasetForm thinks it's being used over the
API.

Change the package controller to not put the API version in the context.

Fixes #390.


Compare: https://github.com/okfn/ckan/compare/fc61614cd566...b6ccfca272fc


More information about the ckan-changes mailing list