Skip to content

Commit

Permalink
[#649] Deprecate package_form_schema() properly
Browse files Browse the repository at this point in the history
I think package_form_schema() was probably deprecated using a code
comment before we had the Right Way of deprecating things (using the
deprecated decorator).
  • Loading branch information
Sean Hammond committed Mar 18, 2013
1 parent ca87536 commit 0030d73
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ckan/logic/schema.py
Expand Up @@ -50,6 +50,7 @@
convert_group_name_or_id_to_id,)
from formencode.validators import OneOf
import ckan.model
import ckan.lib.maintain as maintain

def default_resource_schema():

Expand Down Expand Up @@ -166,11 +167,13 @@ def default_update_package_schema():
schema['owner_org'] = [ignore_missing, owner_org_validator, unicode]
return schema


@maintain.deprecated()
def package_form_schema():
# This function is deprecated and was replaced by
# form_to_db_package_schema(), it remains here for backwards compatibility.
'''DEPRECATED. Use form_to_db_package_schema() instead.'''
return form_to_db_package_schema()


def form_to_db_package_schema():

schema = _base_package_schema()
Expand Down

0 comments on commit 0030d73

Please sign in to comment.