sentry-init-fix
All checks were successful
Deploy on push / deploy (push) Successful in 23s

This commit is contained in:
2024-04-08 09:17:05 +03:00
parent 8aa133aab1
commit aa1693cc16
5 changed files with 85 additions and 62 deletions

View File

@@ -35,7 +35,7 @@ async def get_my_shout(_, info, shout_id: int):
)
if not shout:
return {'error': 'no shout found', 'shout': None}
if not shout.published_at:
if not bool(shout.published_at):
author = session.query(Author).filter(Author.user == user_id).first()
if not author:
return {'error': 'no author found', 'shout': None}
@@ -241,7 +241,7 @@ async def update_shout(_, info, shout_id: int, shout_input=None, publish=False):
c = 1
while same_slug_shout is not None:
c += 1
slug += f'-{c}'
slug = f'{slug}-{c}'
same_slug_shout = (
session.query(Shout).filter(Shout.slug == slug).first()
)