MCPcopy
hub / github.com/django/django / get_candidate_relations_to_delete

Function get_candidate_relations_to_delete

django/db/models/deletion.py:106–114  ·  view source on GitHub ↗
(opts)

Source from the content-addressed store, hash-verified

104
105
106def get_candidate_relations_to_delete(opts):
107 # The candidate relations are the ones that come from N-1 and 1-1
108 # relations. N-N (i.e., many-to-many) relations aren't candidates for
109 # deletion.
110 return (
111 f
112 for f in opts.get_fields(include_hidden=True)
113 if f.auto_created and not f.concrete and (f.one_to_one or f.one_to_many)
114 )
115
116
117class Collector:

Callers 2

can_fast_deleteMethod · 0.85
collectMethod · 0.85

Calls 1

get_fieldsMethod · 0.45

Tested by

no test coverage detected