From 3e072c60416c61d9048009abafb78667b38ff888 Mon Sep 17 00:00:00 2001 From: Sean Hammond Date: Wed, 20 Feb 2013 17:29:33 +0100 Subject: [PATCH] Use db_to_form_package_schema() by default Make DefaultDatasetForm's db_to_form_schema() method return db_to_form_package_schema() rather than None, so that validation against db_to_form_package_schema() is done by default, even when there's no IDatasetForm plugin active. The reason for this is that bugs in db_to_form_package_schema() can cause pages to crash, features to stop working, etc., but the tests currently do not catch these bugs because db_to_form_package_schema() is only used when an IDatasetForm plugin that returns a schema based on db_to_form_package_schema() is active, and no such plugin is active when the tests run. --- ckan/lib/plugins.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ckan/lib/plugins.py b/ckan/lib/plugins.py index 4b19c761243..50409562bc1 100644 --- a/ckan/lib/plugins.py +++ b/ckan/lib/plugins.py @@ -251,6 +251,7 @@ def form_to_db_schema_api_update(self): def db_to_form_schema(self): '''This is an interface to manipulate data from the database into a format suitable for the form (optional)''' + return logic.schema.db_to_form_package_schema() def db_to_form_schema_options(self, options): '''This allows the selectino of different schemas for different