Code

raise not found earlier, where it makes more sense to the user
authorrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Mon, 16 Sep 2002 06:39:12 +0000 (06:39 +0000)
committerrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Mon, 16 Sep 2002 06:39:12 +0000 (06:39 +0000)
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1177 57a73879-2fb5-44c3-a270-3262357dd7e2

roundup/cgi/client.py

index 834a08257fdf6f16c27f2c4c63ae99c693037335..c7a2e79c7cba6a9190c21781542e5e7e24d232bd 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: client.py,v 1.35 2002-09-16 05:33:58 richard Exp $
+# $Id: client.py,v 1.36 2002-09-16 06:39:12 richard Exp $
 
 __doc__ = """
 WWW request handler (also used in the stand-alone server).
@@ -297,6 +297,8 @@ class Client:
         if m:
             self.classname = m.group(1)
             self.nodeid = m.group(2)
+            if not self.db.getclass(self.classname).hasnode(self.nodeid):
+                raise NotFound, '%s/%s'%(self.classname, self.nodeid)
             # with a designator, we default to item view
             self.template = 'item'
         else: