diff --git a/resolvers/editor.py b/resolvers/editor.py index c7a11335..4ee98362 100644 --- a/resolvers/editor.py +++ b/resolvers/editor.py @@ -50,8 +50,12 @@ async def get_my_shout(_, info, shout_id: int): @query.field("get_shouts_drafts") @login_required async def get_shouts_drafts(_, info): - info.context.get("user_id") - author_dict = info.context["author"] + # user_id = info.context.get("user_id") + 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") shouts = [] with local_session() as session: