MCPcopy
hub / github.com/django/django / _find_concrete_model_from_proxy

Method _find_concrete_model_from_proxy

django/db/migrations/state.py:564–573  ·  view source on GitHub ↗
(self, proxy_models, model_state)

Source from the content-addressed store, hash-verified

562 return concrete_models_mapping, proxy_models
563
564 def _find_concrete_model_from_proxy(self, proxy_models, model_state):
565 for base in model_state.bases:
566 if not (isinstance(base, str) or issubclass(base, models.Model)):
567 continue
568 base_key = make_model_tuple(base)
569 base_state = proxy_models.get(base_key)
570 if not base_state:
571 # Concrete model found, stop looking at bases.
572 return base_key
573 return self._find_concrete_model_from_proxy(proxy_models, base_state)
574
575 def clone(self):
576 """Return an exact copy of this ProjectState."""

Calls 2

make_model_tupleFunction · 0.90
getMethod · 0.45

Tested by

no test coverage detected