less-scope-exception

This commit is contained in:
Untone 2024-03-05 14:38:04 +03:00
parent 1099f8a185
commit c8b55d0d5b

View File

@ -57,7 +57,6 @@ async def get_shout(_, info, slug=None, shout_id=None):
q = q.filter(Shout.deleted_at.is_(None)).group_by(Shout.id) q = q.filter(Shout.deleted_at.is_(None)).group_by(Shout.id)
try:
results = session.execute(q).first() results = session.execute(q).first()
if results: if results:
[ [
@ -124,10 +123,6 @@ async def get_shout(_, info, slug=None, shout_id=None):
if main_topic: if main_topic:
shout.main_topic = main_topic[0] shout.main_topic = main_topic[0]
return shout return shout
except Exception:
raise HTTPException(
status_code=404, detail=f'shout {slug or shout_id} not found'
)
@query.field('load_shouts_by') @query.field('load_shouts_by')