[web/views] Fix AutoformSectionRelationTags.set_muledit_editable
authorNicola Spanti <nicola.spanti@logilab.fr>
Fri, 13 Apr 2018 17:28:14 +0200
changeset 12787 be63e0fd43d0
parent 12786 8a1b7aaf8309
child 12788 6086f3d503a5
[web/views] Fix AutoformSectionRelationTags.set_muledit_editable It is a method call, so `self` is passed implicitely as first argument, so it is useless to pass it also explicitely as second argument. In fact, it does not work without this. A monkey patch had been done in a private client's project, but the fix is revelant for everyone.
cubicweb/web/views/uicfg.py
--- a/cubicweb/web/views/uicfg.py	Fri Feb 22 16:47:40 2019 +0100
+++ b/cubicweb/web/views/uicfg.py	Fri Apr 13 17:28:14 2018 +0200
@@ -523,7 +523,7 @@
           afs.set_muledit_editable('CWUser', ('firstname', 'surname', 'in_group'))
         """
         for attr in attrs:
-            self.edit_as_attr(self, etype, attr, formtype='muledit')
+            self.edit_as_attr(etype, attr, formtype='muledit')
 
 
 autoform_section = AutoformSectionRelationTags(__module__=__name__)