refs #709, fix typos
This commit is contained in:
parent
87c97efce0
commit
15bbf26b93
@ -1047,13 +1047,12 @@ class CachedReferenceField(BaseField):
|
|||||||
doc_tipe = self.document_type
|
doc_tipe = self.document_type
|
||||||
|
|
||||||
if isinstance(document, Document):
|
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
|
id_ = document.pk
|
||||||
if id_ is None:
|
if id_ is None:
|
||||||
self.error('You can only reference documents once they have'
|
self.error('You can only reference documents once they have'
|
||||||
' been saved to the database')
|
' been saved to the database')
|
||||||
else:
|
else:
|
||||||
raise SystemError(document)
|
|
||||||
self.error('Only accept a document object')
|
self.error('Only accept a document object')
|
||||||
|
|
||||||
value = {
|
value = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user