diff libervia/pages/tickets/edit/page_meta.py @ 1194:bed008b65d7c

pages (merge-requests/edit, tickets/edit, tickets/new): use serialised extra following backend change + fixed use of "update" when editing ticket: "update" was not set in extra, as a result some metadata could be lost on update (author, comments_uri). fix 301
author Goffi <goffi@goffi.org>
date Fri, 14 Jun 2019 12:50:59 +0200
parents 7b05ebc46141
children 5e67c2564779
line wrap: on
line diff
--- a/libervia/pages/tickets/edit/page_meta.py	Wed Jun 12 20:05:45 2019 +0200
+++ b/libervia/pages/tickets/edit/page_meta.py	Fri Jun 14 12:50:59 2019 +0200
@@ -5,6 +5,7 @@
 from sat.core.i18n import _
 from twisted.internet import defer
 from sat.tools.common import template_xmlui
+from sat.tools.common import data_format
 from sat.core.log import getLogger
 
 log = getLogger(__name__)
@@ -102,8 +103,10 @@
     posted_data[u'body'] = [u'<div xmlns="{ns}">{body}</div>'.format(ns=C.NS_XHTML,
                                                                      body=body)]
 
+    extra = {u'update': True}
     yield self.host.bridgeCall(
-        "ticketSet", service.full(), node, posted_data, u"", ticket_id, {}, profile
+        "ticketSet", service.full(), node, posted_data, u"", ticket_id,
+        data_format.serialise(extra), profile
     )
     # we don't want to redirect to edit page on success, but to tickets list
     data["post_redirect_page"] = (