comparison src/pages/tickets/new/page_meta.py @ 970:bc28b9068f91

page(tickets/new): refuse request if title is not set
author Goffi <goffi@goffi.org>
date Thu, 09 Nov 2017 08:02:49 +0100
parents 8943ee1cf3d7
children 6e966ef8d69f
comparison
equal deleted inserted replaced
969:8943ee1cf3d7 970:bc28b9068f91
28 def on_data_post(self, request): 28 def on_data_post(self, request):
29 data = self.getRData(request) 29 data = self.getRData(request)
30 service = data['service'] 30 service = data['service']
31 node = data['node'] 31 node = data['node']
32 posted_data = self.getAllPostedData(request) 32 posted_data = self.getAllPostedData(request)
33 if not posted_data['title']:
34 self.pageError(request, C.HTTP_BAD_REQUEST)
33 profile = self.getProfile(request) 35 profile = self.getProfile(request)
34 yield self.host.bridge.ticketsSet(service.full(), node, posted_data, u'', u'', {}, profile) 36 yield self.host.bridge.ticketsSet(service.full(), node, posted_data, u'', u'', {}, profile)
35 # we don't want to redirect to creation page on success, but to tickets list 37 # we don't want to redirect to creation page on success, but to tickets list
36 data['post_redirect_page'] = (self.getPageByName(u'tickets_list'), 38 data['post_redirect_page'] = (self.getPageByName(u'tickets_list'),
37 service.full(), 39 service.full(),