drafts-debug
All checks were successful
Deploy on push / deploy (push) Successful in 24s

This commit is contained in:
Untone 2024-04-30 14:10:01 +03:00
parent a7f163009e
commit 61c7f5a0dc

View File

@ -50,8 +50,12 @@ async def get_my_shout(_, info, shout_id: int):
@query.field("get_shouts_drafts") @query.field("get_shouts_drafts")
@login_required @login_required
async def get_shouts_drafts(_, info): async def get_shouts_drafts(_, info):
info.context.get("user_id") # user_id = info.context.get("user_id")
author_dict = info.context["author"] author_dict = info.context.get("author")
if not author_dict:
logger.error("trying to get drafts failed")
logger.debug(info)
return []
author_id = author_dict.get("id") author_id = author_dict.get("id")
shouts = [] shouts = []
with local_session() as session: with local_session() as session: