Fixed #29133 -- Fixed call_command() crash if a required option is passed in options.

This commit is contained in:
Alex Tomic 2018-03-02 12:25:08 -05:00 committed by Tim Graham
parent 40bac28faa
commit a1a3e51561
3 changed files with 31 additions and 1 deletions

View file

@ -0,0 +1,11 @@
from django.core.management.base import BaseCommand
class Command(BaseCommand):
def add_arguments(self, parser):
parser.add_argument('-n', '--need-me', required=True)
parser.add_argument('-t', '--need-me-too', required=True, dest='needme2')
def handle(self, *args, **options):
self.stdout.write(','.join(options))