diff src/pages/tickets/new/page_meta.py @ 977:d0de2a98e852

pages (tickets/new): refuse data if body is not set
author Goffi <goffi@goffi.org>
date Sat, 11 Nov 2017 19:02:27 +0100
parents 0f676f09404b
children a78169c1bf77
line wrap: on
line diff
--- a/src/pages/tickets/new/page_meta.py	Sat Nov 11 18:57:01 2017 +0100
+++ b/src/pages/tickets/new/page_meta.py	Sat Nov 11 19:02:27 2017 +0100
@@ -37,7 +37,7 @@
     service = data['service']
     node = data['node']
     posted_data = self.getAllPostedData(request)
-    if not posted_data['title']:
+    if not posted_data['title'] or not posted_data['body']:
         self.pageError(request, C.HTTP_BAD_REQUEST)
     try:
         posted_data['labels'] = [l.strip() for l in posted_data['labels'][0].split(',')]