From 7c641974686e2836cc77bb1358dae20be362ba4b Mon Sep 17 00:00:00 2001 From: Marc Aymerich Date: Wed, 29 Mar 2017 20:04:42 +0000 Subject: [PATCH] Fixed ascii_validator --- orchestra/core/validators.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/orchestra/core/validators.py b/orchestra/core/validators.py index f9fc6c07..ef4a2730 100644 --- a/orchestra/core/validators.py +++ b/orchestra/core/validators.py @@ -97,7 +97,7 @@ def validate_name(value): def validate_ascii(value): try: value.encode('ascii') - except UnicodeDecodeError: + except UnicodeEncodeError: raise ValidationError('This is not an ASCII string.')