Reload uses shard_key if applicable (#384)
This commit is contained in:
parent
af86aee970
commit
fa83fba637
2 changed files with 2 additions and 3 deletions
|
|
@ -4,6 +4,7 @@ Changelog
|
|||
|
||||
Changes in 0.8.3
|
||||
================
|
||||
- Reload uses shard_key if applicable (#384)
|
||||
- Dynamic fields are ordered based on creation and stored in _fields_ordered (#396)
|
||||
- Fixed pickling dynamic documents `_dynamic_fields` (#387)
|
||||
- Fixed ListField setslice and delslice dirty tracking (#390)
|
||||
|
|
|
|||
|
|
@ -266,7 +266,6 @@ class Document(BaseDocument):
|
|||
upsert=True, **write_concern)
|
||||
created = is_new_object(last_error)
|
||||
|
||||
|
||||
if cascade is None:
|
||||
cascade = self._meta.get('cascade', False) or cascade_kwargs is not None
|
||||
|
||||
|
|
@ -451,9 +450,8 @@ class Document(BaseDocument):
|
|||
.. versionadded:: 0.1.2
|
||||
.. versionchanged:: 0.6 Now chainable
|
||||
"""
|
||||
id_field = self._meta['id_field']
|
||||
obj = self._qs.read_preference(ReadPreference.PRIMARY).filter(
|
||||
**{id_field: self[id_field]}).limit(1).select_related(max_depth=max_depth)
|
||||
**self._object_key).limit(1).select_related(max_depth=max_depth)
|
||||
|
||||
if obj:
|
||||
obj = obj[0]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue