mirror of
				https://github.com/SectorLabs/django-localized-fields.git
				synced 2025-10-31 02:48:56 +03:00 
			
		
		
		
	__eq__ should only compare same types
unless it's a string
This commit is contained in:
		| @@ -85,6 +85,11 @@ class LocalizedValue: | ||||
|             And False when they are not. | ||||
|         """ | ||||
|  | ||||
|         if not isinstance(other, type(self)): | ||||
|             if isinstance(other, str): | ||||
|                 return self.__str__() == other | ||||
|             return False | ||||
|  | ||||
|         for lang_code, _ in settings.LANGUAGES: | ||||
|             if self.get(lang_code) != other.get(lang_code): | ||||
|                 return False | ||||
|   | ||||
		Reference in New Issue
	
	Block a user