fix: unicode handles more than just str
This commit is contained in:
parent
bd46a75aff
commit
75d81da634
1 changed files with 1 additions and 1 deletions
|
|
@ -144,7 +144,7 @@ def _(msg: str, lang: str | None = None, context: str | None = None) -> str:
|
|||
return translated_string or non_translated_string
|
||||
|
||||
|
||||
def as_unicode(text: str, encoding: str = "utf-8") -> str:
|
||||
def as_unicode(text, encoding: str = "utf-8") -> str:
|
||||
"""Convert to unicode if required"""
|
||||
if isinstance(text, str):
|
||||
return text
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue