Skip to content

Commit 39262c2

Browse files
author
Jan Schrewe
committed
Hmm, hopefully get a useable message for jschrewe#57 now.
1 parent 3d099bb commit 39262c2

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

mongodbforms/documents.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ def _post_clean(self):
413413
error = e.errors.get(MONGO_NON_FIELD_ERRORS)
414414
else:
415415
error = e.message
416-
self._update_errors({NON_FIELD_ERRORS: error})
416+
self._update_errors({NON_FIELD_ERRORS: [error, ]})
417417

418418
# Validate uniqueness if needed.
419419
if self._validate_unique:
@@ -464,8 +464,6 @@ def validate_unique(self):
464464

465465
return errors
466466

467-
468-
469467
def save(self, commit=True):
470468
"""
471469
Saves this ``form``'s cleaned_data into model instance
@@ -487,6 +485,7 @@ def save(self, commit=True):
487485
return obj
488486
save.alters_data = True
489487

488+
490489
class DocumentForm(with_metaclass(DocumentFormMetaclass, BaseDocumentForm)):
491490
pass
492491

0 commit comments

Comments
 (0)