mirror of
				https://github.com/django/django.git
				synced 2025-10-31 01:25:32 +00:00 
			
		
		
		
	Fixed #17947 -- Fixed language restore after management command even when exceptions occur. Thanks andrey@kostenko.name for the report and the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17823 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
		| @@ -247,8 +247,9 @@ class BaseCommand(object): | ||||
|             else: | ||||
|                 self.stderr.write(smart_str(self.style.ERROR('Error: %s\n' % e))) | ||||
|             sys.exit(1) | ||||
|         if saved_lang is not None: | ||||
|             translation.activate(saved_lang) | ||||
|         finally: | ||||
|             if saved_lang is not None: | ||||
|                 translation.activate(saved_lang) | ||||
|  | ||||
|     def validate(self, app=None, display_num_errors=False): | ||||
|         """ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user