Skip to content

Commit

Permalink
[#649] Delete package_create_validate()
Browse files Browse the repository at this point in the history
Delete package_create_validate() action function.

This function has no docstring and no tests, and duplicates package dict
validation code in package_create().
  • Loading branch information
Sean Hammond committed Mar 18, 2013
1 parent 6604d7b commit c9a4c27
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions ckan/logic/action/create.py
Expand Up @@ -178,19 +178,6 @@ def package_create(context, data_dict):

return output

def package_create_validate(context, data_dict):
model = context['model']
schema = lib_plugins.lookup_package_plugin().form_to_db_schema()

_check_access('package_create',context,data_dict)

data, errors = _validate(data_dict, schema, context)
if errors:
model.Session.rollback()
raise ValidationError(errors)
else:
return data

def resource_create(context, data_dict):
'''Appends a new resource to a datasets list of resources.
Expand Down

0 comments on commit c9a4c27

Please sign in to comment.