diff --git a/handlers/start.py b/handlers/start.py index 570ac30..51de9a0 100644 --- a/handlers/start.py +++ b/handlers/start.py @@ -93,8 +93,8 @@ async def start_command(message: Message): try: existing = await call_api("GET", f"/user/{user_id}") - user_exists = existing not in (None, "ERROR") - + user_exists = isinstance( + existing, dict) and existing.get("id") is not None if not user_exists: logger.debug(f"[start] Пользователь {user_id} не найден, создаю.") create_result = await call_api(