MCPcopy
hub / github.com/django/django / _resolve_natural_key

Method _resolve_natural_key

django/core/serializers/base.py:212–217  ·  view source on GitHub ↗

Return a natural key tuple for the given object when available.

(self, obj)

Source from the content-addressed store, hash-verified

210 return self.stream.getvalue()
211
212 def _resolve_natural_key(self, obj):
213 """Return a natural key tuple for the given object when available."""
214 try:
215 return obj.natural_key()
216 except AttributeError:
217 return None
218
219 def _resolve_fk_natural_key(self, obj, field):
220 """

Callers 3

get_dump_objectMethod · 0.95
start_objectMethod · 0.95
handle_m2mMethod · 0.95

Calls 1

natural_keyMethod · 0.45

Tested by

no test coverage detected