family-name-fix
This commit is contained in:
parent
9911a9410d
commit
937b154c6b
|
@ -31,3 +31,7 @@ isort = "^5.13.2"
|
|||
[build-system]
|
||||
requires = ["poetry-core>=1.0.0"]
|
||||
build-backend = "poetry.core.masonry.api"
|
||||
|
||||
[tool.pyright]
|
||||
venvPath = "."
|
||||
venv = ".venv"
|
||||
|
|
|
@ -27,10 +27,10 @@ class WebhookEndpoint(HTTPEndpoint):
|
|||
raise HTTPException(
|
||||
status_code=400, detail='User data is not a dictionary'
|
||||
)
|
||||
user_id: str = user.get('id')
|
||||
user_id: str = user.get('id', '')
|
||||
name: str = (
|
||||
f"{user.get('given_name', user.get('slug'))} {user.get('middle_name', '')}"
|
||||
+ "{user.get('family_name', '')}".strip()
|
||||
+ f"{user.get('family_name', '')}".strip()
|
||||
) or 'Аноним'
|
||||
email: str = user.get('email', '')
|
||||
pic: str = user.get('picture', '')
|
||||
|
|
Loading…
Reference in New Issue
Block a user