Commit 270051d8 authored by Julien Muchembled's avatar Julien Muchembled

Check all products are imported before we import document classes

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@39852 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 55de1dac
...@@ -56,12 +56,16 @@ def InitializeInteractor(interactor_class, interactor_path=None): ...@@ -56,12 +56,16 @@ def InitializeInteractor(interactor_class, interactor_path=None):
def initializeProductDocumentRegistry(): def initializeProductDocumentRegistry():
from Utils import importLocalDocument from Utils import importLocalDocument
count = len(product_document_registry)
for (class_id, class_path) in product_document_registry.iteritems(): for (class_id, class_path) in product_document_registry.iteritems():
importLocalDocument(class_id, class_path=class_path) importLocalDocument(class_id, class_path=class_path)
#from Testing import ZopeTestCase #from Testing import ZopeTestCase
#ZopeTestCase._print('Added product document to ERP5Type repository: %s (%s) \n' % (class_id, document_path)) #ZopeTestCase._print('Added product document to ERP5Type repository: %s (%s) \n' % (class_id, document_path))
#LOG('Added product document to ERP5Type repository: %s (%s)' % (class_id, document_path), 0, '') #LOG('Added product document to ERP5Type repository: %s (%s)' % (class_id, document_path), 0, '')
#print 'Added product document to ERP5Type repository: %s (%s)' % (class_id, document_path) #print 'Added product document to ERP5Type repository: %s (%s)' % (class_id, document_path)
# make sure all products are imported before we import document classes
# (FIXME: is it true ?)
assert count == len(product_document_registry)
def initializeProductInteractorRegistry(): def initializeProductInteractorRegistry():
from Utils import importLocalInteractor from Utils import importLocalInteractor
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment