webhook-fix
This commit is contained in:
parent
5ff28ce31b
commit
21bcda1e3b
|
@ -30,7 +30,7 @@ class WebhookEndpoint(HTTPEndpoint):
|
||||||
pic: str = user.get('picture', '')
|
pic: str = user.get('picture', '')
|
||||||
|
|
||||||
with local_session() as session:
|
with local_session() as session:
|
||||||
author = session.query(Author).filter(Author.email == email).first()
|
author = session.query(Author).filter(Author.user == user_id).first()
|
||||||
if not author:
|
if not author:
|
||||||
# If the author does not exist, create a new one
|
# If the author does not exist, create a new one
|
||||||
slug: str = email.split('@')[0].replace(".", "-").lower()
|
slug: str = email.split('@')[0].replace(".", "-").lower()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user