This commit is contained in:
Untone 2024-05-01 03:46:16 +03:00
parent 12e42f2023
commit 658a2400c4

View File

@ -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