proper rewrite
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 13 Aug 2009 10:49:46 +0200
changeset 2806 9d7173656a1a
parent 2804 0d01413ec9ae
child 2807 696ff03f9a58
proper rewrite
web/uicfg.py
--- a/web/uicfg.py	Thu Aug 13 10:32:03 2009 +0200
+++ b/web/uicfg.py	Thu Aug 13 10:49:46 2009 +0200
@@ -156,14 +156,14 @@
         super(InitializableDict, self).__init__(*args, **kwargs)
         register_rtag(self)
 
-    def init(schema, check=True):
+    def init(self, schema, check=True):
         for eschema in schema.entities():
             if eschema.schema_entity():
-                uicfg.indexview_etype_section.setdefault(eschema, 'schema')
+                self.setdefault(eschema, 'schema')
             elif eschema.is_subobject(strict=True):
-                uicfg.indexview_etype_section.setdefault(eschema, 'subobject')
+                self.setdefault(eschema, 'subobject')
             else:
-                uicfg.indexview_etype_section.setdefault(eschema, 'application')
+                self.setdefault(eschema, 'application')
 
 indexview_etype_section = InitializableDict(EmailAddress='subobject',
                                             CWUser='system',