Mercurial > libervia-backend
diff src/tmp/wokkel/pubsub.py @ 2200:95dc90f1065a
tmp (wokkel/pubsub): fixed configuration setting
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 23 Mar 2017 09:07:10 +0100 |
parents | 44f12990e275 |
children | 7f91b894bfdf |
line wrap: on
line diff
--- a/src/tmp/wokkel/pubsub.py Tue Mar 14 00:21:20 2017 +0100 +++ b/src/tmp/wokkel/pubsub.py Thu Mar 23 09:07:10 2017 +0100 @@ -471,7 +471,7 @@ Parse optional node configuration form in create request. """ for element in verbElement.parent.elements(): - if element.uri == NS_PUBSUB and element.name == 'configure': + if element.uri == NS_PUBSUB_OWNER and element.name == 'configure': form = data_form.findForm(element, NS_PUBSUB_NODE_CONFIG) if form is not None: if form.formType != 'submit': @@ -488,7 +488,10 @@ Render optional node configuration form in create request. """ if self.options is not None: - configure = verbElement.parent.addElement('configure') + if verbElement.name == 'configure': + configure = verbElement + else: + configure = verbElement.parent.addElement('configure') configure.addChild(self.options.toElement()) @@ -1266,7 +1269,6 @@ def _onPubSubRequest(self, iq): request = self._request_class.fromElement(iq) - if self.resource is not None: resource = self.resource.locateResource(request) else: