Commits

Olemis Lang  committed 6c99c13

BH Multiproduct #577 : ID cannot be set for /newticket request

  • Participants
  • Parent commits 3459851
  • Branches t577_newticket_id

Comments (0)

Files changed (2)

+t577/t577_r1496958_newticket_id.diff

File t577/t577_r1496958_newticket_id.diff

+# HG changeset patch
+# Parent 3c1e652d3ebc360f9824fc1c507192f8df51b1aa
+BH Multiproduct #577 : Existing tickets are opened via /newticket URL
+
+diff --git a/bloodhound_multiproduct/multiproduct/ticket/web_ui.py b/bloodhound_multiproduct/multiproduct/ticket/web_ui.py
+--- a/bloodhound_multiproduct/multiproduct/ticket/web_ui.py
++++ b/bloodhound_multiproduct/multiproduct/ticket/web_ui.py
+@@ -54,8 +54,7 @@
+         productid = req.args.get('productid','')
+         
+         if ticketid:
+-            if (req.path_info == '/products/' + productid + '/newticket' or
+-                req.path_info == '/products'):
++            if req.path_info in ('/newticket', '/products'):
+                 raise TracError(_("id can't be set for a new ticket request."))
+             ticket = Ticket(self.env, ticketid)
+             if productid and ticket['product'] != productid: