Some tests broke over the default None value.
This commit is contained in:
parent
16e1f72e65
commit
ffc8b21f67
@ -1,4 +1,5 @@
|
|||||||
from base import BaseField, ObjectIdField, ValidationError, get_document
|
from base import BaseField, ObjectIdField, ValidationError, get_document
|
||||||
|
from queryset import DO_NOTHING
|
||||||
from document import Document, EmbeddedDocument
|
from document import Document, EmbeddedDocument
|
||||||
from connection import _get_db
|
from connection import _get_db
|
||||||
from operator import itemgetter
|
from operator import itemgetter
|
||||||
@ -417,7 +418,7 @@ class ReferenceField(BaseField):
|
|||||||
access (lazily).
|
access (lazily).
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, document_type, delete_rule=None, **kwargs):
|
def __init__(self, document_type, delete_rule=DO_NOTHING, **kwargs):
|
||||||
if not isinstance(document_type, basestring):
|
if not isinstance(document_type, basestring):
|
||||||
if not issubclass(document_type, (Document, basestring)):
|
if not issubclass(document_type, (Document, basestring)):
|
||||||
raise ValidationError('Argument to ReferenceField constructor '
|
raise ValidationError('Argument to ReferenceField constructor '
|
||||||
|
Loading…
x
Reference in New Issue
Block a user