mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	Fixed a small bug in strings_only handling for force_unicode().
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6267 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
		| @@ -30,7 +30,7 @@ def force_unicode(s, encoding='utf-8', strings_only=False, errors='strict'): | ||||
|  | ||||
|     If strings_only is True, don't convert (some) non-string-like objects. | ||||
|     """ | ||||
|     if strings_only and isinstance(s, (types.NoneType, int)): | ||||
|     if strings_only and isinstance(s, (types.NoneType, int, long)): | ||||
|         return s | ||||
|     if not isinstance(s, basestring,): | ||||
|         if hasattr(s, '__unicode__'): | ||||
|   | ||||
		Reference in New Issue
	
	Block a user