Mercurial > libervia-web
comparison src/pages/tickets/edit/page_meta.py @ 1098:01e95ec9df9e
server, pages: fixed blocking calls to bridge by using bridgeCall instead
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 01 Jun 2018 15:09:19 +0200 |
parents | 01538d8a77be |
children | cdd389ef97bc |
comparison
equal
deleted
inserted
replaced
1097:f134c0ecb1d5 | 1098:01e95ec9df9e |
---|---|
31 service, node, ticket_id = data.get(u'service', u''), data.get(u'node', u''), data[u'ticket_id'] | 31 service, node, ticket_id = data.get(u'service', u''), data.get(u'node', u''), data[u'ticket_id'] |
32 profile = self.getProfile(request) | 32 profile = self.getProfile(request) |
33 | 33 |
34 | 34 |
35 ignore = ('publisher', 'author', 'author_jid', 'author_email', 'created', 'updated', 'comments_uri') | 35 ignore = ('publisher', 'author', 'author_jid', 'author_email', 'created', 'updated', 'comments_uri') |
36 tickets = yield self.host.bridge.ticketsGet(service.full() if service else u'', node, C.NO_LIMIT, [ticket_id], '', {}, profile) | 36 tickets = yield self.host.bridgeCall("ticketsGet", service.full() if service else u'', node, C.NO_LIMIT, [ticket_id], '', {}, profile) |
37 ticket = [template_xmlui.create(self.host, x, ignore=ignore) for x in tickets[0]][0] | 37 ticket = [template_xmlui.create(self.host, x, ignore=ignore) for x in tickets[0]][0] |
38 | 38 |
39 try: | 39 try: |
40 # small trick to get a one line text input instead of the big textarea | 40 # small trick to get a one line text input instead of the big textarea |
41 ticket.widgets[u'labels'].type = u'string' | 41 ticket.widgets[u'labels'].type = u'string' |
56 try: | 56 try: |
57 posted_data['labels'] = [l.strip() for l in posted_data['labels'][0].split(',')] | 57 posted_data['labels'] = [l.strip() for l in posted_data['labels'][0].split(',')] |
58 except (KeyError, IndexError): | 58 except (KeyError, IndexError): |
59 pass | 59 pass |
60 profile = self.getProfile(request) | 60 profile = self.getProfile(request) |
61 yield self.host.bridge.ticketSet(service.full(), node, posted_data, u'', ticket_id, {}, profile) | 61 yield self.host.bridgeCall("ticketSet", service.full(), node, posted_data, u'', ticket_id, {}, profile) |
62 # we don't want to redirect to edit page on success, but to tickets list | 62 # we don't want to redirect to edit page on success, but to tickets list |
63 data['post_redirect_page'] = (self.getPageByName(u'tickets'), | 63 data['post_redirect_page'] = (self.getPageByName(u'tickets'), |
64 service.full(), | 64 service.full(), |
65 node or u'@') | 65 node or u'@') |