comparison src/pages/tickets/view/page_meta.py @ 994:b92b06f023cb

pages: profile is now always set in template_data, and None if there is no user logged
author Goffi <goffi@goffi.org>
date Wed, 13 Dec 2017 00:37:12 +0100
parents 97cce8c1e96a
children 1c09f41e2f52
comparison
equal deleted inserted replaced
993:641664553a41 994:b92b06f023cb
33 service, node, ticket_id = data.get(u'service', u''), data.get(u'node', u''), data[u'ticket_id'] 33 service, node, ticket_id = data.get(u'service', u''), data.get(u'node', u''), data[u'ticket_id']
34 profile = self.getProfile(request) 34 profile = self.getProfile(request)
35 35
36 if profile is None: 36 if profile is None:
37 profile = C.SERVICE_PROFILE 37 profile = C.SERVICE_PROFILE
38 else:
39 template_data['profile'] = profile
40 38
41 tickets = yield self.host.bridge.ticketsGet(service.full() if service else u'', node, C.NO_LIMIT, [ticket_id], '', {}, profile) 39 tickets = yield self.host.bridge.ticketsGet(service.full() if service else u'', node, C.NO_LIMIT, [ticket_id], '', {}, profile)
42 ticket = [template_xmlui.create(self.host, x, ignore=['publisher']) for x in tickets[0]][0] 40 ticket = [template_xmlui.create(self.host, x, ignore=['publisher']) for x in tickets[0]][0]
43 template_data[u'item'] = ticket 41 template_data[u'item'] = ticket
44 comments_uri = ticket.widgets['comments_uri'].value 42 comments_uri = ticket.widgets['comments_uri'].value