Set view argument as optional in inner table view
authorThierry Florac <thierry.florac@onf.fr>
Wed, 23 May 2018 15:24:40 +0200
changeset 67 c59cf337d102
parent 66 3e45ad0f6af2
child 68 27ca00d70a54
Set view argument as optional in inner table view
src/pyams_zmi/zmi/table.py
--- a/src/pyams_zmi/zmi/table.py	Fri May 04 09:56:18 2018 +0200
+++ b/src/pyams_zmi/zmi/table.py	Wed May 23 15:24:40 2018 +0200
@@ -34,7 +34,7 @@
     fields = field.Fields(Interface)
     table_class = None
 
-    def __init__(self, context, request, view):
+    def __init__(self, context, request, view=None):
         super(InnerTableView, self).__init__(context, request, view)
         self.table = self.table_class(context, request)
         self.table.view = self