MCPcopy Index your code
hub / github.com/MongoEngine/mongoengine / mark_as_changed_wrapper

Function mark_as_changed_wrapper

mongoengine/base/datastructures.py:17–26  ·  view source on GitHub ↗

Decorator that ensures _mark_as_changed method gets called.

(parent_method)

Source from the content-addressed store, hash-verified

15
16
17def mark_as_changed_wrapper(parent_method):
18 """Decorator that ensures _mark_as_changed method gets called."""
19
20 def wrapper(self, *args, **kwargs):
21 # Can't use super() in the decorator.
22 result = parent_method(self, *args, **kwargs)
23 self._mark_as_changed()
24 return result
25
26 return wrapper
27
28
29def mark_key_as_changed_wrapper(parent_method):

Callers 2

BaseDictClass · 0.85
BaseListClass · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…