diff libervia/pages/merge-requests/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 29eb15062416
children b2d067339de3
line wrap: on
line diff
--- a/libervia/pages/merge-requests/edit/page_meta.py	Wed Jun 12 20:05:45 2019 +0200
+++ b/libervia/pages/merge-requests/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
 
 """merge-requests edition"""
@@ -102,6 +103,7 @@
     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(
         "mergeRequestSet",
         service.full(),
@@ -111,7 +113,7 @@
         posted_data,
         u"",
         ticket_id,
-        {"update": C.BOOL_TRUE},
+        data_format.serialise(extra),
         profile,
     )
     # we don't want to redirect to edit page on success, but to tickets list