Mercurial > libervia-backend
comparison src/tmp/wokkel/pubsub.py @ 2217:893030a9d351
tmp(wokkel/pubsub): fixed configuration parsing
author | Goffi <goffi@goffi.org> |
---|---|
date | Mon, 03 Apr 2017 00:13:33 +0200 |
parents | 582359de7268 |
children | 3399971f0aa0 |
comparison
equal
deleted
inserted
replaced
2216:7e06eafef409 | 2217:893030a9d351 |
---|---|
468 def _parse_configureOrNone(self, verbElement): | 468 def _parse_configureOrNone(self, verbElement): |
469 """ | 469 """ |
470 Parse optional node configuration form in create request. | 470 Parse optional node configuration form in create request. |
471 """ | 471 """ |
472 for element in verbElement.parent.elements(): | 472 for element in verbElement.parent.elements(): |
473 if element.uri == NS_PUBSUB_OWNER and element.name == 'configure': | 473 if element.uri in (NS_PUBSUB, NS_PUBSUB_OWNER) and element.name == 'configure': |
474 form = data_form.findForm(element, NS_PUBSUB_NODE_CONFIG) | 474 form = data_form.findForm(element, NS_PUBSUB_NODE_CONFIG) |
475 if form is not None: | 475 if form is not None: |
476 if form.formType != 'submit': | 476 if form.formType != 'submit': |
477 raise BadRequest(text=u"Unexpected form type '%s'" % | 477 raise BadRequest(text=u"Unexpected form type '%s'" % |
478 form.formType) | 478 form.formType) |