diff options
| author | Sergey Fedoseev <fedoseev.sergey@gmail.com> | 2018-01-04 04:37:23 +0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2018-01-03 18:37:23 -0500 |
| commit | c2d0f8c084456b5073252a91eeb09ab3d7453b18 (patch) | |
| tree | e4da823d0cf1545b75d38ce07ef61540c691a910 | |
| parent | 602481d0c9edb79692955e073fa481c322f1df47 (diff) | |
Simplified an iterator in core.serializers.sort_dependencies().
Follow up to acc8dd4142ec81def9a73507120c0262ba6b1264.
| -rw-r--r-- | django/core/serializers/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/core/serializers/__init__.py b/django/core/serializers/__init__.py index 3406572b76..4b0ae078e2 100644 --- a/django/core/serializers/__init__.py +++ b/django/core/serializers/__init__.py @@ -216,7 +216,7 @@ def sort_dependencies(app_list): # If all of the models in the dependency list are either already # on the final model list, or not on the original serialization list, # 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) changed = True else: |
