diff options
| author | Владимир Лысенко <wofkin@gmail.com> | 2020-09-17 10:24:57 +0200 |
|---|---|---|
| committer | Carlton Gibson <carlton@noumenal.es> | 2020-09-17 10:49:54 +0200 |
| commit | b376297d6c2eec5dd878dee35b36bb985b723244 (patch) | |
| tree | 857e7be600de64fa818e8ca7cb1cd7996b892f20 | |
| parent | a046bcadbee2dc0e6c889f82c08b5a21a32359ad (diff) | |
Tweaked loaddata command to re-use a calculated value.
Removed a dublicated call to get_public_serializer_formats which
had already populated self.serialization_formats.
Thanks to Nick Pope for review.
| -rw-r--r-- | django/core/management/commands/loaddata.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/core/management/commands/loaddata.py b/django/core/management/commands/loaddata.py index eda3d068af..4d4cdfcbb3 100644 --- a/django/core/management/commands/loaddata.py +++ b/django/core/management/commands/loaddata.py @@ -232,7 +232,7 @@ class Command(BaseCommand): fixture_name, ser_fmt, cmp_fmt = self.parse_name(fixture_label) databases = [self.using, None] cmp_fmts = list(self.compression_formats) if cmp_fmt is None else [cmp_fmt] - ser_fmts = serializers.get_public_serializer_formats() if ser_fmt is None else [ser_fmt] + ser_fmts = self.serialization_formats if ser_fmt is None else [ser_fmt] if self.verbosity >= 2: self.stdout.write("Loading '%s' fixtures..." % fixture_name) |
