Skip to content

Commit

Permalink
Merge branch '1033-term-translation-validation'
Browse files Browse the repository at this point in the history
  • Loading branch information
tobes committed Jun 24, 2013
2 parents 8f1d572 + c06534a commit 1d01f69
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions ckan/logic/action/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -764,11 +764,10 @@ def term_translation_update_many(context, data_dict):
'''
model = context['model']


if not data_dict.get('data') and isinstance(data_dict, list):
if not (data_dict.get('data') and isinstance(data_dict.get('data'), list)):
raise ValidationError(
{'error':
'term_translation_update_many needs to have a list of dicts in field data'}
{'error': ['term_translation_update_many needs to have a '
'list of dicts in field data']}
)

context['defer_commit'] = True
Expand Down

0 comments on commit 1d01f69

Please sign in to comment.