This commit is contained in:
parent
52f46555a7
commit
8d058b4902
|
@ -250,8 +250,9 @@ async def update_shout(_, info, shout_id, shout_input=None, publish=False):
|
|||
@mutation.field('delete_shout')
|
||||
@login_required
|
||||
async def delete_shout(_, info, shout_id):
|
||||
user_id = info.context['user_id']
|
||||
roles = info.context['roles']
|
||||
user_id = info.context.get('user_id')
|
||||
roles = info.context.get('roles')
|
||||
if user_id:
|
||||
with local_session() as session:
|
||||
author = session.query(Author).filter(Author.user == user_id).first()
|
||||
shout = session.query(Shout).filter(Shout.id == shout_id).first()
|
||||
|
|
Loading…
Reference in New Issue
Block a user