CVS: Products/ParsedXML - ManageableDOM.py:1.112

Martijn Faassen <[email protected]> Thu, 2 Jan 2003 09:46:47 -0500
Newsgroups gmane.comp.web.zope.parsed-xml
Message-ID <[email protected]>
Update of /cvs-repository/Products/ParsedXML
In directory cvs.zope.org:/tmp/cvs-serv26333

Modified Files:
	ManageableDOM.py 
Log Message:
Bugfix for getId(). Note that Zope search operations seem to enter ParsedXML
documents and in case of big documents (or presumably many of them) this
gets ridiculously slow..


=== Products/ParsedXML/ManageableDOM.py 1.111 => 1.112 ===
--- Products/ParsedXML/ManageableDOM.py:1.111	Fri Dec 20 10:29:28 2002
+++ Products/ParsedXML/ManageableDOM.py	Thu Jan  2 09:46:45 2003
@@ -89,7 +89,7 @@
 
 import Globals
 import Acquisition
-from Acquisition import aq_parent
+from Acquisition import aq_parent, aq_base
 import App.Management
 from OFS.Traversable import Traversable
 from DateTime import DateTime # for manage_edit cookie expire
@@ -190,10 +190,7 @@
 
     def getId(self):
         "Return the id of the object as a string."
-        if hasattr(self.aq_base):
-            base = self.aq_base
-        else:
-            base = self
+        base = aq_base(self)
         name=getattr(base, 'id', None)
         if name is not None:
             return name