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

Method __get__

mongoengine/fields.py:2176–2183  ·  view source on GitHub ↗
(self, instance, owner)

Source from the content-addressed store, hash-verified

2174 )
2175
2176 def __get__(self, instance, owner):
2177 value = super().__get__(instance, owner)
2178 if value is None and instance._initialised:
2179 value = self.generate()
2180 instance._data[self.name] = value
2181 instance._mark_as_changed(self.name)
2182
2183 return value
2184
2185 def __set__(self, instance, value):
2186 if value is None and instance._initialised:

Callers

nothing calls this directly

Calls 3

generateMethod · 0.95
__get__Method · 0.45
_mark_as_changedMethod · 0.45

Tested by

no test coverage detected