Skip to content

Commit

Permalink
Bug fix: records field can be empty.
Browse files Browse the repository at this point in the history
  • Loading branch information
johnglover committed Jul 24, 2012
1 parent a62293a commit 1a8709d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ckanext/datastore/logic/action/create.py
Expand Up @@ -30,7 +30,7 @@ def datastore_create(context, data_dict):
model = _get_or_bust(context, 'model')
resource_id = _get_or_bust(data_dict, 'resource_id')
fields = data_dict.get('fields')
records = _get_or_bust(data_dict, 'records')
records = data_dict.get('records')

_check_access('datastore_create', context, data_dict)

Expand Down
1 change: 1 addition & 0 deletions ckanext/datastore/logic/schema.py
Expand Up @@ -14,6 +14,7 @@ def default_fields_schema():


def default_datastore_create_schema():
# TODO: resource_id should have a resource_id_exists validator
return {
'resource_id': [not_missing, not_empty, unicode],
'fields': default_fields_schema(),
Expand Down

0 comments on commit 1a8709d

Please sign in to comment.