Commit dbc86dcb by Scott Duckworth

fix bug in last commit

parent e8d249b6
...@@ -21,7 +21,7 @@ class UserKey(models.Model): ...@@ -21,7 +21,7 @@ class UserKey(models.Model):
if not exclude or 'key' not in exclude: if not exclude or 'key' not in exclude:
self.key = self.key.strip() self.key = self.key.strip()
if len(self.key.splitlines()) > 1: if len(self.key.splitlines()) > 1:
raise ValidationError('Only one line is allowed') raise ValidationError({'key': ['Only one line is allowed']})
def clean(self): def clean(self):
try: try:
......
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