From 15bbf26b93197240fb2800a4f69e14d000038e60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wilson=20J=C3=BAnior?= Date: Fri, 25 Jul 2014 08:48:24 -0300 Subject: [PATCH] refs #709, fix typos --- mongoengine/fields.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mongoengine/fields.py b/mongoengine/fields.py index abe2a491..9b19f25d 100644 --- a/mongoengine/fields.py +++ b/mongoengine/fields.py @@ -1047,13 +1047,12 @@ class CachedReferenceField(BaseField): doc_tipe = self.document_type if isinstance(document, Document): - # Wen need the id from the saved object to create the DBRef + # We need the id from the saved object to create the DBRef id_ = document.pk if id_ is None: self.error('You can only reference documents once they have' ' been saved to the database') else: - raise SystemError(document) self.error('Only accept a document object') value = {