Commit c3370910 authored by Ayush Tiwari's avatar Ayush Tiwari

bt5_config: Commit transaction after building a new BM

parent 4c397dd6
...@@ -35,6 +35,7 @@ import shutil ...@@ -35,6 +35,7 @@ import shutil
import sys import sys
import hashlib import hashlib
import pprint import pprint
import transaction
from Acquisition import Implicit, Explicit from Acquisition import Implicit, Explicit
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
...@@ -793,7 +794,8 @@ class TemplateTool (BaseTool): ...@@ -793,7 +794,8 @@ class TemplateTool (BaseTool):
kw['removable_sub_object_path'] = removable_sub_object_path kw['removable_sub_object_path'] = removable_sub_object_path
migrated_bm.build(**kw) migrated_bm.build(**kw)
# Commit transaction to generate all oids before exporting
transaction.commit()
# Export the newly built business package to the export directory # Export the newly built business package to the export directory
migrated_bm.export(path=export_dir, local=True) migrated_bm.export(path=export_dir, local=True)
...@@ -1054,10 +1056,24 @@ class TemplateTool (BaseTool): ...@@ -1054,10 +1056,24 @@ class TemplateTool (BaseTool):
'title': 'erp5_mysql_ndb_catalog', 'title': 'erp5_mysql_ndb_catalog',
'version': '1.0'} 'version': '1.0'}
bm_dict_4 ={
'copyright_list': ['Copyright (c) 2001-2017 Nexedi SA'],
'dependency_list': ['erp5_view_style',],
'description': '',
'force_install': 0,
'id': 'erp5_jquery',
'license': 'GPL',
'revision': '',
'test_dependency_list': [],
'provision_list': [],
'title': 'erp5_jquery',
'version': '1.0'}
if repository.endswith('/bootstrap'): if repository.endswith('/bootstrap'):
property_dict_list.append(bm_dict_1) property_dict_list.append(bm_dict_1)
property_dict_list.append(bm_dict_2) property_dict_list.append(bm_dict_2)
property_dict_list.append(bm_dict_3) property_dict_list.append(bm_dict_3)
property_dict_list.append(bm_dict_4)
self.repository_dict[repository] = tuple(property_dict_list) self.repository_dict[repository] = tuple(property_dict_list)
......
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