From cb9ac61876ce3665308c9d96de40029c523cdc0f Mon Sep 17 00:00:00 2001 From: Dominik Picheta Date: Tue, 30 Dec 2014 15:34:23 +0000 Subject: [PATCH] Ported fix to #17 --- forum.nim | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/forum.nim b/forum.nim index 4508802..fb28493 100644 --- a/forum.nim +++ b/forum.nim @@ -759,6 +759,11 @@ routes: get "/t/@threadid/?@page?/?@postid?/?": createTFD() parseInt(@"threadid", c.threadId, -1..1000_000) + + if c.threadId == unselectedThread: + # Thread has just been deleted. + redirect(uri("/")) + if @"page".len > 0: parseInt(@"page", c.pageNum, 0..1000_000) if @"postid".len > 0: