diff --git a/django/core/management/__init__.py b/django/core/management/__init__.py index d74befa844..2e1cdb149b 100644 --- a/django/core/management/__init__.py +++ b/django/core/management/__init__.py @@ -104,7 +104,7 @@ def call_command(name, *args, **options): if command.use_argparse: # Use the `dest` option name from the parser option opt_mapping = dict((sorted(s_opt.option_strings)[0].lstrip('-').replace('-', '_'), s_opt.dest) - for s_opt in parser._actions if s_opt.option_strings) + for s_opt in parser._actions if s_opt.option_strings) arg_options = dict((opt_mapping.get(key, key), value) for key, value in options.items()) defaults = parser.parse_args(args=args) defaults = dict(defaults._get_kwargs(), **arg_options)