Render self in DirectoryNodeHandler.getChild()

We need self.render_POST() etc. to be invoked when we have a request
such as "POST /uri/URI:DIR:..."; throwing an error here is probably
not the right thing to do.
This commit is contained in:
Sajith Sasidharan 2020-05-28 13:49:13 -04:00 committed by Sajith Sasidharan
parent 7444d6b7a9
commit 5892eae580

View File

@ -103,12 +103,10 @@ class DirectoryNodeHandler(ReplaceMeMixin, Resource, object):
# for these nodes, which is that a URI like
# "/uri/URI%3ADIR2%3Aj...vq/" (that is, with a trailing slash
# or no further children) renders "this" page
name = name.decode('utf8')
if not name:
raise EmptyPathnameComponentError(
u"The webapi does not allow empty pathname components",
)
return self
name = name.decode('utf8')
d = self.node.get(name)
d.addBoth(self._got_child, req, name)
return d