Skip to content

Commit

Permalink
- Adjusted validator for empty passwords to raise StopOnError so that…
Browse files Browse the repository at this point in the history
… further validators don't run and we only get one Missing Value message
  • Loading branch information
dwcaraway authored and Alex Perfilov committed May 16, 2016
1 parent f4c119a commit 1129923
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ckan/logic/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,8 @@ def user_password_not_empty(key, data, errors, context):
if not ('password1',) in data and not ('password2',) in data:
password = data.get(('password',),None)
if not password:
errors[key].append(_('Missing value'))
errors[key]=[_('Missing value')]
raise StopOnError

def user_about_validator(value,context):
if 'http://' in value or 'https://' in value:
Expand Down

0 comments on commit 1129923

Please sign in to comment.