Code

db/userN wasn't returning HTMLUser
authorrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Mon, 29 Mar 2004 00:49:26 +0000 (00:49 +0000)
committerrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Mon, 29 Mar 2004 00:49:26 +0000 (00:49 +0000)
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@2226 57a73879-2fb5-44c3-a270-3262357dd7e2

roundup/cgi/templating.py

index 68abcaa04c1c382a40f5d2b260eeb8a146f58213..372b8fea2a63eb9d0023a55af6041ea8364a536b 100644 (file)
@@ -253,8 +253,13 @@ class HTMLDatabase:
         # check to see if we're actually accessing an item
         m = desre.match(item)
         if m:
-            self._client.db.getclass(m.group('cl'))
-            return HTMLItem(self._client, m.group('cl'), m.group('id'))
+            cl = m.group('cl')
+            self._client.db.getclass(cl)
+            if cl == 'user':
+                klass = HTMLUser
+            else:
+                klass = HTMLItem
+            return klass(self._client, cl, m.group('id'))
         else:
             self._client.db.getclass(item)
             if item == 'user':