mirror of
https://github.com/django/django.git
synced 2024-12-22 17:16:24 +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_fields = []
|
||||
for index in range(len(self.from_fields)):
|
||||
from_field_name = self.from_fields[index]
|
||||
to_field_name = self.to_fields[index]
|
||||
for from_field_name, to_field_name in zip(self.from_fields, self.to_fields):
|
||||
from_field = (
|
||||
self
|
||||
if from_field_name == RECURSIVE_RELATIONSHIP_CONSTANT
|
||||
|
Loading…
Reference in New Issue
Block a user