Mercurial > libervia-web
comparison src/pages/merge-requests/view/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 | f134c0ecb1d5 |
children | cdd389ef97bc |
comparison
equal
deleted
inserted
replaced
1097:f134c0ecb1d5 | 1098:01e95ec9df9e |
---|---|
37 profile = self.getProfile(request) | 37 profile = self.getProfile(request) |
38 | 38 |
39 if profile is None: | 39 if profile is None: |
40 profile = C.SERVICE_PROFILE | 40 profile = C.SERVICE_PROFILE |
41 | 41 |
42 tickets, metadata, parsed_tickets = yield self.host.bridge.mergeRequestsGet(service.full() if service else u'', | 42 tickets, metadata, parsed_tickets = yield self.host.bridgeCall("mergeRequestsGet", service.full() if service else u'', |
43 node, | 43 node, |
44 C.NO_LIMIT, | 44 C.NO_LIMIT, |
45 [ticket_id], | 45 [ticket_id], |
46 '', | 46 '', |
47 {'parse': C.BOOL_TRUE, | 47 {'parse': C.BOOL_TRUE, |
48 'labels_as_list': C.BOOL_TRUE}, | 48 'labels_as_list': C.BOOL_TRUE}, |
49 profile) | 49 profile) |
50 ticket = template_xmlui.create(self.host, tickets[0], ignore=['request_data', 'type']) | 50 ticket = template_xmlui.create(self.host, tickets[0], ignore=['request_data', 'type']) |
51 template_data[u'item'] = ticket | 51 template_data[u'item'] = ticket |
52 template_data['patches'] = parsed_tickets[0] | 52 template_data['patches'] = parsed_tickets[0] |
53 comments_uri = ticket.widgets['comments_uri'].value | 53 comments_uri = ticket.widgets['comments_uri'].value |
54 if comments_uri: | 54 if comments_uri: |
55 uri_data = uri.parseXMPPUri(comments_uri) | 55 uri_data = uri.parseXMPPUri(comments_uri) |
56 template_data['comments_node'] = comments_node = uri_data['node'] | 56 template_data['comments_node'] = comments_node = uri_data['node'] |
57 template_data['comments_service'] = comments_service = uri_data['path'] | 57 template_data['comments_service'] = comments_service = uri_data['path'] |
58 comments = yield self.host.bridge.mbGet(comments_service, | 58 comments = yield self.host.bridgeCall("mbGet", |
59 comments_node, | 59 comments_service, |
60 C.NO_LIMIT, | 60 comments_node, |
61 [], | 61 C.NO_LIMIT, |
62 {}, | 62 [], |
63 profile) | 63 {}, |
64 profile) | |
64 | 65 |
65 template_data[u'comments'] = data_objects.BlogItems(comments) | 66 template_data[u'comments'] = data_objects.BlogItems(comments) |
66 template_data[u'login_url'] = self.getPageRedirectURL(request) | 67 template_data[u'login_url'] = self.getPageRedirectURL(request) |
67 | 68 |
68 if session.connected: | 69 if session.connected: |