Ignore:
Timestamp:
Aug 20, 2009 11:46:35 AM (15 years ago)
Author:
koval
Message:

fixed bug in constructor section when re-importing objects with index_html id

File:
1 edited

Legend:

Unmodified
Added
Removed
  • quintagroup.transmogrifier/branches/plone-3.1/collective.transmogrifier/collective/transmogrifier/sections/constructor.py

    r526 r1254  
    5454            # these attributes can be also used as content ids 
    5555            if id in ALLWAYS_EXISTING_ATTRIBUTES: 
    56                 o = getattr(aq_base(context), id) 
    57                 # check if it is content object (is instance of some portal type) 
    58                 if getattr(aq_base(o), 'getPortalTypeName', None) is not None: 
     56                # 'getattr' function always return ComputedAttribute object for 'index_html' 
     57                # whether 'index_html' object is in context or no, but 'get' method 
     58                # returns correct value 
     59                if aq_base(context).get(id, None) is not None: 
    5960                    yield item; continue 
    6061            elif getattr(aq_base(context), id, None) is not None: # item exists 
Note: See TracChangeset for help on using the changeset viewer.