mirror of
https://github.com/django/django.git
synced 2025-10-26 15:16:09 +00:00
Fixed #23309 -- Fixed call_command to parse args correctly
This commit is contained in:
committed by
Claude Paroz
parent
7ed3d0bb61
commit
e0a98e2374
@@ -350,11 +350,7 @@ class BaseCommand(object):
|
||||
options = parser.parse_args(argv[2:])
|
||||
cmd_options = vars(options)
|
||||
# Move positional args out of options to mimic legacy optparse
|
||||
if 'args' in options:
|
||||
args = options.args
|
||||
del cmd_options['args']
|
||||
else:
|
||||
args = ()
|
||||
args = cmd_options.pop('args', ())
|
||||
else:
|
||||
options, args = parser.parse_args(argv[2:])
|
||||
cmd_options = vars(options)
|
||||
|
||||
Reference in New Issue
Block a user