[web actions] fix recent refactoring, leading to missing redirect parameters in action's url stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 17 Jun 2010 16:16:08 +0200
branchstable
changeset 5776 e7a88c97fef7
parent 5773 aae03cd19151
child 5777 941038164cf5
[web actions] fix recent refactoring, leading to missing redirect parameters in action's url
web/views/actions.py
--- a/web/views/actions.py	Thu Jun 17 15:09:12 2010 +0200
+++ b/web/views/actions.py	Thu Jun 17 16:16:08 2010 +0200
@@ -274,11 +274,11 @@
                     continue
             if role == 'subject':
                 label = 'add %s %s %s %s' % (eschema, rschema, teschema, role)
-                url = self.linkto_url(entity, rschema, teschema, 'object')
+                url = self.linkto_url(entity, rschema, teschema, 'object', **params)
             else:
                 label = 'add %s %s %s %s' % (teschema, rschema, eschema, role)
-                url = self.linkto_url(entity, rschema, teschema, 'subject')
-            yield self.build_action(self._cw._(label), url, **params)
+                url = self.linkto_url(entity, rschema, teschema, 'subject', **params)
+            yield self.build_action(self._cw._(label), url)
 
     def add_related_schemas(self, entity):
         """this is actually used ui method to generate 'addrelated' actions from