Commit dbc86dcb by Scott Duckworth

fix bug in last commit

parent e8d249b6
......@@ -21,7 +21,7 @@ class UserKey(models.Model):
if not exclude or 'key' not in exclude:
self.key = self.key.strip()
if len(self.key.splitlines()) > 1:
raise ValidationError('Only one line is allowed')
raise ValidationError({'key': ['Only one line is allowed']})
def clean(self):
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment