Fixed EmbeddedDocument validation bug

This commit is contained in:
Harry Marr
2010-02-02 17:37:09 +00:00
parent e05d31eaaf
commit 0bbf3a3d76
2 changed files with 7 additions and 1 deletions

View File

@@ -129,6 +129,7 @@ class EmbeddedDocumentField(BaseField):
if not isinstance(value, self.document):
raise ValidationError('Invalid embedded document instance '
'provided to an EmbeddedDocumentField')
self.document.validate(value)
def lookup_member(self, member_name):
return self.document._fields.get(member_name)