[component] avoid conflict on global/local identifier
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 14 Oct 2010 09:49:59 +0200
changeset 6489 6ea74c34fc25
parent 6488 a512dd258ee8
child 6490 34359fbde6ef
[component] avoid conflict on global/local identifier
web/component.py
--- a/web/component.py	Thu Oct 14 09:01:58 2010 +0200
+++ b/web/component.py	Thu Oct 14 09:49:59 2010 +0200
@@ -362,8 +362,7 @@
 class EditRelationMixIn(ReloadableMixIn):
     def box_item(self, entity, etarget, rql, label):
         """builds HTML link to edit relation between `entity` and `etarget`"""
-        role, target = role(self), get_target(self)
-        args = {role[0] : entity.eid, target[0] : etarget.eid}
+        args = {role(self)[0] : entity.eid, get_target(self)[0] : etarget.eid}
         url = self._cw.user_rql_callback((rql, args))
         # for each target, provide a link to edit the relation
         return u'[<a href="%s">%s</a>] %s' % (xml_escape(url), label,