mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	[4.0.x] Fixed #33205 -- Made call_command() raise TypeError when dest with multiple arguments is passed.
Backport of c1e4111c74 from main
			
			
This commit is contained in:
		
				
					committed by
					
						 Mariusz Felisiak
						Mariusz Felisiak
					
				
			
			
				
	
			
			
			
						parent
						
							ac815f6ea8
						
					
				
				
					commit
					c9ebe4ca4e
				
			| @@ -0,0 +1,13 @@ | ||||
| from django.core.management.base import BaseCommand | ||||
|  | ||||
|  | ||||
| class Command(BaseCommand): | ||||
|     def add_arguments(self, parser): | ||||
|         group = parser.add_mutually_exclusive_group(required=True) | ||||
|         group.add_argument('--for', dest='until', action='store') | ||||
|         group.add_argument('--until', action='store') | ||||
|  | ||||
|     def handle(self, *args, **options): | ||||
|         for option, value in options.items(): | ||||
|             if value is not None: | ||||
|                 self.stdout.write('%s=%s' % (option, value)) | ||||
		Reference in New Issue
	
	Block a user