From bd5f910f8c0ed0c623e8c50e521a0f8ed0f4cb92 Mon Sep 17 00:00:00 2001 From: Untone Date: Wed, 31 Jan 2024 22:47:30 +0300 Subject: [PATCH] delete-shout-fix --- resolvers/editor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resolvers/editor.py b/resolvers/editor.py index 82ccda51..d611ceac 100644 --- a/resolvers/editor.py +++ b/resolvers/editor.py @@ -199,7 +199,7 @@ async def update_shout( # noqa: C901 async def delete_shout(_, info, shout_id): user_id = info.context['user_id'] with local_session() as session: - author = session.query(Author).filter(Author.id == user_id).first() + author = session.query(Author).filter(Author.user == user_id).first() shout = session.query(Shout).filter(Shout.id == shout_id).first() if not shout: return {'error': 'invalid shout id'}