return error when thread is not found
This commit is contained in:
parent
4228107b54
commit
16b468d9ab
@ -85,6 +85,9 @@ async def get_thread(thread_id: int):
|
||||
if post.thread_id == thread_id:
|
||||
result.append(post)
|
||||
|
||||
if len(result) == 0:
|
||||
return {'error': 'could not find parent thread'}
|
||||
|
||||
return result
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user