mirror of
https://github.com/pretix/pretix.git
synced 2026-05-04 15:04:03 +00:00
Fixed a bug in LazyI18nString.__bool__
This commit is contained in:
@@ -41,7 +41,11 @@ class LazyI18nString:
|
||||
return self.localize(translation.get_language())
|
||||
|
||||
def __bool__(self):
|
||||
return bool(len(self.data)) and (any(self.data.values()) if isinstance(self.data, dict) else bool(self.data))
|
||||
if not self.data:
|
||||
return False
|
||||
if isinstance(self.data, dict):
|
||||
return any(self.data.values())
|
||||
return True
|
||||
|
||||
def localize(self, lng):
|
||||
if self.data is None:
|
||||
|
||||
Reference in New Issue
Block a user