Mercurial > libervia-backend
comparison src/plugins/plugin_exp_pubsub_schema.py @ 2426:6c39f30444a0
plugin schema: prepend a "publisher" field after "id" in getDataFormItems with published given by PubSub service
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 11 Nov 2017 18:34:21 +0100 |
parents | b7e24ce97a06 |
children | 544c4d2fec45 |
comparison
equal
deleted
inserted
replaced
2425:d294527bd46f | 2426:6c39f30444a0 |
---|---|
237 if form_ns and form.formNamespace != form_ns: | 237 if form_ns and form.formNamespace != form_ns: |
238 continue | 238 continue |
239 xmlui = xml_tools.dataFormResult2XMLUI( | 239 xmlui = xml_tools.dataFormResult2XMLUI( |
240 form, | 240 form, |
241 schema_form, | 241 schema_form, |
242 prepend = (('label', 'id'),('text', item_elt['id'], u'id')), | 242 # FIXME: conflicts with schema (i.e. if "id" or "publisher" already exists) |
243 # are not checked | |
244 prepend = (('label', 'id'),('text', item_elt['id'], u'id'), | |
245 ('label', 'publisher'),('text', item_elt.getAttribute('publisher',''), u'publisher')), | |
243 filters = filters, | 246 filters = filters, |
244 ) | 247 ) |
245 items_xmlui.append(xmlui) | 248 items_xmlui.append(xmlui) |
246 break | 249 break |
247 defer.returnValue((items_xmlui, metadata)) | 250 defer.returnValue((items_xmlui, metadata)) |