[Zope-dev] ZPatterns: transaction bug

Steve Spicklemire steve@spvi.com
Mon, 4 Sep 2000 13:57:50 -0500 (EST)


ZPatterns 0.4.2a1 PlugIns.py bug?

I get a 'Name Error' aq_base when I hit the following code
while trying to update the index_html method of one of my
Specialists from CVSMixin.. I think that this would get
hit anytime you add an object whose id is already in the
acquisition path.... 

-steve

diff -c -r1.1.1.2 PlugIns.py
*** PlugIns.py  2000/09/04 14:17:29     1.1.1.2
--- PlugIns.py  2000/09/04 18:53:17
***************
*** 265,271 ****
                  # An object by the given id exists either in this
                  # ObjectManager or in the acquisition path.
                  flags = getattr(obj, '__replaceable__', NOT_REPLACEABLE)
!                 if hasattr(aq_base(self), id):
                      # The object is located in this ObjectManager.
                      if not flags & REPLACEABLE:
                          raise 'Bad Request', ('The id "%s" is invalid - ' \
--- 265,271 ----
                  # An object by the given id exists either in this
                  # ObjectManager or in the acquisition path.
                  flags = getattr(obj, '__replaceable__', NOT_REPLACEABLE)
!                 if hasattr(self.aq_base, id):
                      # The object is located in this ObjectManager.
                      if not flags & REPLACEABLE:
                          raise 'Bad Request', ('The id "%s" is invalid - ' \