Merge fixes
This commit is contained in:
@@ -30,7 +30,7 @@ class BaseDocument(object):
|
||||
_dynamic_lock = True
|
||||
_initialised = False
|
||||
|
||||
def __init__(self, __auto_convert=True, *args, **values):
|
||||
def __init__(self, *args, **values):
|
||||
"""
|
||||
Initialise a document or embedded document
|
||||
|
||||
@@ -46,7 +46,7 @@ class BaseDocument(object):
|
||||
if name in values:
|
||||
raise TypeError("Multiple values for keyword argument '" + name + "'")
|
||||
values[name] = value
|
||||
|
||||
__auto_convert = values.pop("__auto_convert", True)
|
||||
signals.pre_init.send(self.__class__, document=self, values=values)
|
||||
|
||||
self._data = {}
|
||||
|
||||
@@ -1138,8 +1138,13 @@ class QuerySet(object):
|
||||
|
||||
if self._hint != -1:
|
||||
self._cursor_obj.hint(self._hint)
|
||||
|
||||
return self._cursor_obj
|
||||
|
||||
def __deepcopy__(self, memo):
|
||||
"""Essential for chained queries with ReferenceFields involved"""
|
||||
return self.clone()
|
||||
|
||||
@property
|
||||
def _query(self):
|
||||
if self._mongo_query is None:
|
||||
@@ -1302,6 +1307,9 @@ class QuerySet(object):
|
||||
except:
|
||||
pass
|
||||
key_list.append((key, direction))
|
||||
|
||||
if self._cursor_obj:
|
||||
self._cursor_obj.sort(key_list)
|
||||
return key_list
|
||||
|
||||
def _get_scalar(self, doc):
|
||||
|
||||
Reference in New Issue
Block a user