comparison src/pages/tickets/new/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 35f6a46d7ff1
children cdd389ef97bc
comparison
equal deleted inserted replaced
1097:f134c0ecb1d5 1098:01e95ec9df9e
17 def prepare_render(self, request): 17 def prepare_render(self, request):
18 data = self.getRData(request) 18 data = self.getRData(request)
19 template_data = request.template_data 19 template_data = request.template_data
20 service, node = data.get(u'service', u''), data.get(u'node', u'') 20 service, node = data.get(u'service', u''), data.get(u'node', u'')
21 profile = self.getProfile(request) 21 profile = self.getProfile(request)
22 schema = yield self.host.bridge.ticketsSchemaGet(service.full(), node, profile) 22 schema = yield self.host.bridgeCall("ticketsSchemaGet", service.full(), node, profile)
23 data['schema'] = schema 23 data['schema'] = schema
24 # following fields are handled in backend 24 # following fields are handled in backend
25 ignore = ('author', 'author_jid', 'author_email', 'created', 'updated', 'comments_uri', 'status', 'milestone', 'priority') 25 ignore = ('author', 'author_jid', 'author_email', 'created', 'updated', 'comments_uri', 'status', 'milestone', 'priority')
26 xmlui_obj = template_xmlui.create(self.host, schema, ignore=ignore) 26 xmlui_obj = template_xmlui.create(self.host, schema, ignore=ignore)
27 try: 27 try:
42 try: 42 try:
43 posted_data['labels'] = [l.strip() for l in posted_data['labels'][0].split(',')] 43 posted_data['labels'] = [l.strip() for l in posted_data['labels'][0].split(',')]
44 except (KeyError, IndexError): 44 except (KeyError, IndexError):
45 pass 45 pass
46 profile = self.getProfile(request) 46 profile = self.getProfile(request)
47 yield self.host.bridge.ticketSet(service.full(), node, posted_data, u'', u'', {}, profile) 47 yield self.host.bridgeCall("ticketSet", service.full(), node, posted_data, u'', u'', {}, profile)
48 # we don't want to redirect to creation page on success, but to tickets list 48 # we don't want to redirect to creation page on success, but to tickets list
49 data['post_redirect_page'] = (self.getPageByName(u'tickets'), 49 data['post_redirect_page'] = (self.getPageByName(u'tickets'),
50 service.full(), 50 service.full(),
51 node or u'@') 51 node or u'@')