Skip to content

Commit

Permalink
Revert changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Furr committed Jul 12, 2018
1 parent 404d8c1 commit 7f0d184
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion mongoengine/base/datastructures.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,14 @@ def update(self, *args, **kwargs):
return super(BaseDict, self).update(*args, **kwargs)

def _mark_as_changed(self, key=None):
if hasattr(self._instance, '_mark_as_changed'):
if key:
self._instance._mark_as_changed(
'%s.%s' % (self._name, key % len(self))
)
else:
self._instance._mark_as_changed(self._name)
"""
try:
if hasattr(self._instance, '_mark_as_changed'):
if key:
Expand All @@ -98,7 +106,7 @@ def _mark_as_changed(self, key=None):
self._instance._mark_as_changed(self._name)
except (ReferenceError, TypeError):
pass

"""

class BaseList(list):
"""A special list so we can watch any changes."""
Expand Down

0 comments on commit 7f0d184

Please sign in to comment.