Simplified an iterator in core.serializers.sort_dependencies().

Follow up to acc8dd4142.
This commit is contained in:
Sergey Fedoseev 2018-01-04 04:37:23 +05:00 committed by Tim Graham
parent 602481d0c9
commit c2d0f8c084
1 changed files with 1 additions and 1 deletions

View File

@ -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: