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