mirror of
https://github.com/django/django.git
synced 2025-08-13 13:29:18 +00:00
Simplified ForeignObject.resolve_related_fields() a bit.
This commit is contained in:
parent
eeb5c583f7
commit
23df37d53a
@ -714,9 +714,7 @@ class ForeignObject(RelatedField):
|
|||||||
"Related model %r cannot be resolved" % self.remote_field.model
|
"Related model %r cannot be resolved" % self.remote_field.model
|
||||||
)
|
)
|
||||||
related_fields = []
|
related_fields = []
|
||||||
for index in range(len(self.from_fields)):
|
for from_field_name, to_field_name in zip(self.from_fields, self.to_fields):
|
||||||
from_field_name = self.from_fields[index]
|
|
||||||
to_field_name = self.to_fields[index]
|
|
||||||
from_field = (
|
from_field = (
|
||||||
self
|
self
|
||||||
if from_field_name == RECURSIVE_RELATIONSHIP_CONSTANT
|
if from_field_name == RECURSIVE_RELATIONSHIP_CONSTANT
|
||||||
|
Loading…
x
Reference in New Issue
Block a user