mirror of https://github.com/django/django.git
Simplified an iterator in core.serializers.sort_dependencies().
Follow up to acc8dd4142
.
This commit is contained in:
parent
602481d0c9
commit
c2d0f8c084
|
@ -216,7 +216,7 @@ def sort_dependencies(app_list):
|
||||||
# If all of the models in the dependency list are either already
|
# If all of the models in the dependency list are either already
|
||||||
# on the final model list, or not on the original serialization list,
|
# on the final model list, or not on the original serialization list,
|
||||||
# then we've found another model with all it's dependencies satisfied.
|
# then we've found another model with all it's dependencies satisfied.
|
||||||
if all(candidate for candidate in ((d not in models or d in model_list) for d in deps)):
|
if all(d not in models or d in model_list for d in deps):
|
||||||
model_list.append(model)
|
model_list.append(model)
|
||||||
changed = True
|
changed = True
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue