mirror of
https://github.com/civsocit/olgram.git
synced 2023-07-22 01:29:12 +03:00
fix empty locale
This commit is contained in:
parent
a7ae47f2a7
commit
0455c6d022
@ -24,6 +24,8 @@ _redis: ty.Optional[Redis] = None
|
||||
|
||||
|
||||
def _get_translator(message: types.Message) -> ty.Callable:
|
||||
if not message.from_user.locale:
|
||||
return _
|
||||
return translators.get(message.from_user.locale.language, _)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user