diff --git a/classes/pyrogroup.py b/classes/pyrogroup.py index 792e1a5..dd2ed4c 100644 --- a/classes/pyrogroup.py +++ b/classes/pyrogroup.py @@ -117,6 +117,8 @@ class PyroGroup: def select_locale( self, app: PyroClient, user: User, ignore_auto: bool = False ) -> str: + if user is None: + return app.default_locale if not ignore_auto and self.locale_auto is True: if user.language_code is not None: return user.language_code