mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	Removed always True if check in stringfilter decorator.
This commit is contained in:
		| @@ -37,12 +37,11 @@ def stringfilter(func): | ||||
|     passed as the first positional argument will be converted to a string. | ||||
|     """ | ||||
|     def _dec(*args, **kwargs): | ||||
|         if args: | ||||
|             args = list(args) | ||||
|             args[0] = str(args[0]) | ||||
|             if (isinstance(args[0], SafeData) and | ||||
|                     getattr(_dec._decorated_function, 'is_safe', False)): | ||||
|                 return mark_safe(func(*args, **kwargs)) | ||||
|         args = list(args) | ||||
|         args[0] = str(args[0]) | ||||
|         if (isinstance(args[0], SafeData) and | ||||
|                 getattr(_dec._decorated_function, 'is_safe', False)): | ||||
|             return mark_safe(func(*args, **kwargs)) | ||||
|         return func(*args, **kwargs) | ||||
|  | ||||
|     # Include a reference to the real function (used to check original | ||||
|   | ||||
		Reference in New Issue
	
	Block a user