diff --git a/backend/forum.py b/backend/forum.py index 92dd41c..672b686 100644 --- a/backend/forum.py +++ b/backend/forum.py @@ -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