diff --git a/resolvers/editor.py b/resolvers/editor.py index f59547c2..48af2765 100644 --- a/resolvers/editor.py +++ b/resolvers/editor.py @@ -45,7 +45,7 @@ async def get_my_shout(_, info, shout_id: int): logger.debug(f'viewer is{'' if is_editor else ' not'} editor') is_creator = author_id == shout.created_by logger.debug(f'viewer is{'' if is_creator else ' not'} creator') - is_author = filter(lambda x: x.id == int(author_id), [x for x in shout.authors]) + is_author = bool(list(filter(lambda x: x.id == int(author_id), [x for x in shout.authors]))) logger.debug(f'viewer is{'' if is_creator else ' not'} author') can_edit = is_editor or is_author or is_creator