[web/component] move unicode() call around
authorJulien Cristau <julien.cristau@logilab.fr>
Wed, 23 Jul 2014 16:24:17 +0200
changeset 9915 020d2e453e6f
parent 9914 30b56a56c1f4
child 9916 986797d779ea
[web/component] move unicode() call around Makes Aurélien happier.
web/component.py
--- a/web/component.py	Wed Jul 23 12:07:50 2014 +0200
+++ b/web/component.py	Wed Jul 23 16:24:17 2014 +0200
@@ -513,12 +513,12 @@
         """builds HTML link to edit relation between `entity` and `etarget`"""
         args = {role(self) : entity.eid, target(self): etarget.eid}
         # for each target, provide a link to edit the relation
-        jscall = unicode(js.cw.utils.callAjaxFuncThenReload(fname,
-                                                            self.rtype,
-                                                            args['subject'],
-                                                            args['object']))
+        jscall = js.cw.utils.callAjaxFuncThenReload(fname,
+                                                    self.rtype,
+                                                    args['subject'],
+                                                    args['object'])
         return u'[<a href="javascript: %s" class="action">%s</a>] %s' % (
-            xml_escape(jscall), label, etarget.view('incontext'))
+            xml_escape(unicode(jscall)), label, etarget.view('incontext'))
 
     def related_boxitems(self, entity):
         return [self.box_item(entity, etarget, 'delete_relation', u'-')