• Julien Muchembled's avatar
    Prevent transaction.commit() from reloading ghost portal types · 5992ea61
    Julien Muchembled authored
    Note this also fixes TestERP5Type.test_04_CategoryAccessors
    A shorter test case would be:
    
      def test(self):
        self.login()
        self.portal.portal_types.Person.foo = 0
        self.portal.person_module.newContent(portal_type='Person')
        transaction.abort()
        self.portal.portal_types.Person.foo = 0
        self.portal.portal_categories.region.newContent()
        self.portal.person_module.newContent(portal_type='Person')
        transaction.commit() # raise ConflictError without this fix
    
    (provided Person portal type does not have 'type_class' attribute at the
     beginning).
    
    git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41203 20353a03-c40f-0410-a6d1-a30d3c3de9de
    5992ea61
lazy_class.py 7.77 KB