Skip to content

Commit 44fd451

Browse files
author
Richard Jones
committed
db/userN wasn't returning HTMLUser
1 parent 819951a commit 44fd451

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

roundup/cgi/templating.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,13 @@ def __getitem__(self, item, desre=re.compile(r'(?P<cl>\w+)(?P<id>[-\d]+)')):
253253
# check to see if we're actually accessing an item
254254
m = desre.match(item)
255255
if m:
256-
self._client.db.getclass(m.group('cl'))
257-
return HTMLItem(self._client, m.group('cl'), m.group('id'))
256+
cl = m.group('cl')
257+
self._client.db.getclass(cl)
258+
if cl == 'user':
259+
klass = HTMLUser
260+
else:
261+
klass = HTMLItem
262+
return klass(self._client, cl, m.group('id'))
258263
else:
259264
self._client.db.getclass(item)
260265
if item == 'user':

0 commit comments

Comments
 (0)