summaryrefslogtreecommitdiff
path: root/django/core/management/commands/dumpdata.py
diff options
context:
space:
mode:
authorNick Pope <nick.pope@flightdataservices.com>2019-02-05 11:22:08 +0000
committerTim Graham <timograham@gmail.com>2019-02-06 13:48:39 -0500
commit24b82cd201e21060fbc02117dc16d1702877a1f3 (patch)
tree7d36db9251700d0abf8fbf69399c8abc7fd9026a /django/core/management/commands/dumpdata.py
parent21bb71ef0dcb86798edb0d8b21138bcc4b947590 (diff)
Fixed #30159 -- Removed unneeded use of OrderedDict.
Dicts preserve order since Python 3.6.
Diffstat (limited to 'django/core/management/commands/dumpdata.py')
-rw-r--r--django/core/management/commands/dumpdata.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/django/core/management/commands/dumpdata.py b/django/core/management/commands/dumpdata.py
index 31df5ac244..ce936c5459 100644
--- a/django/core/management/commands/dumpdata.py
+++ b/django/core/management/commands/dumpdata.py
@@ -1,5 +1,4 @@
import warnings
-from collections import OrderedDict
from django.apps import apps
from django.core import serializers
@@ -87,14 +86,14 @@ class Command(BaseCommand):
if not app_labels:
if primary_keys:
raise CommandError("You can only use --pks option with one model")
- app_list = OrderedDict.fromkeys(
+ app_list = dict.fromkeys(
app_config for app_config in apps.get_app_configs()
if app_config.models_module is not None and app_config not in excluded_apps
)
else:
if len(app_labels) > 1 and primary_keys:
raise CommandError("You can only use --pks option with one model")
- app_list = OrderedDict()
+ app_list = {}
for label in app_labels:
try:
app_label, model_label = label.split('.')