Skip to content

Commit

Permalink
[#649] Rename db_to_form_package_schema() -> default_show_package_sch…
Browse files Browse the repository at this point in the history
…ema()

This makes the name consistent with default_create_package_schema() and
default_update_package_schema().
  • Loading branch information
Sean Hammond committed Mar 19, 2013
1 parent 3c677cf commit b763aa5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ckan/lib/plugins.py
Expand Up @@ -227,7 +227,7 @@ def update_package_schema(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()
return logic.schema.default_show_package_schema()

def db_to_form_schema_options(self, options):
'''This allows the selectino of different schemas for different
Expand Down
2 changes: 1 addition & 1 deletion ckan/logic/schema.py
Expand Up @@ -173,7 +173,7 @@ def default_update_package_schema():

return schema

def db_to_form_package_schema():
def default_show_package_schema():
schema = default_create_package_schema()

# Don't strip ids from package dicts when validating them.
Expand Down
4 changes: 2 additions & 2 deletions ckanext/test_tag_vocab_plugin.py
Expand Up @@ -7,7 +7,7 @@
from genshi.filters import Transformer
from ckan.logic import get_action
from ckan.logic.converters import convert_to_tags, convert_from_tags, free_tags_only
from ckan.logic.schema import default_create_package_schema, default_update_package_schema, db_to_form_package_schema
from ckan.logic.schema import default_create_package_schema, default_update_package_schema, default_show_package_schema
from ckan.lib.navl.validators import ignore_missing, keep_extras
from ckan import plugins

Expand Down Expand Up @@ -64,7 +64,7 @@ def update_package_schema(self):
return schema

def db_to_form_schema(self):
schema = db_to_form_package_schema()
schema = default_show_package_schema()
schema.update({
'tags': {
'__extras': [keep_extras, free_tags_only]
Expand Down

0 comments on commit b763aa5

Please sign in to comment.