multitenant: fix django 1.8 compatibility code (#28039)

This commit is contained in:
Frédéric Péters 2018-11-16 08:34:48 +01:00
parent c192ea99a7
commit e63c39bd9d
1 changed files with 1 additions and 1 deletions

View File

@ -23,7 +23,7 @@ def run_command_from_argv(command, argv):
command._called_from_command_line = True
parser = command.create_parser(argv[0], argv[1])
if command.use_argparse:
if django.VERSION >= (1, 10, 0) or command.use_argparse:
options = parser.parse_args(argv[2:])
cmd_options = vars(options)
# Move positional args out of options to mimic legacy optparse