Skip to content

Commit

Permalink
Tweaked loaddata command to re-use a calculated value.
Browse files Browse the repository at this point in the history
Removed a dublicated call to get_public_serializer_formats which
had already populated self.serialization_formats.

Thanks to Nick Pope for review.
  • Loading branch information
0x55AAh authored and carltongibson committed Sep 17, 2020
1 parent a046bca commit b376297
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion django/core/management/commands/loaddata.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ def find_fixtures(self, fixture_label):
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)
Expand Down

0 comments on commit b376297

Please sign in to comment.