diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/initialize-master-data.py b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/initialize-master-data.py index f4f542edd3d09d4bd133709fe0e42ae4cc4d9ffe..7bb0dbf55934411c0ea5073d4696f8bdeb61d601 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/initialize-master-data.py +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/initialize-master-data.py @@ -14,18 +14,18 @@ # limitations under the License. # # MasterDataRegistrationTransaction Class -import sys -from ch.ethz.sis.openbis.generic.asapi.v3.dto.service import CustomASServiceExecutionOptions -from ch.ethz.sis.openbis.generic.asapi.v3.dto.service.id import CustomASServiceCode from ch.ethz.sis.openbis.generic.server.asapi.v3 import ApplicationServerApi from ch.systemsx.cisd.openbis.generic.server import CommonServiceProvider +from ch.ethz.sis.openbis.generic.asapi.v3.dto.service.id import CustomASServiceCode +from ch.ethz.sis.openbis.generic.asapi.v3.dto.service import CustomASServiceExecutionOptions from ch.systemsx.cisd.openbis.generic.server.jython.api.v1.impl import MasterDataRegistrationHelper +import sys helper = MasterDataRegistrationHelper(sys.path) api = CommonServiceProvider.getApplicationContext().getBean(ApplicationServerApi.INTERNAL_SERVICE_NAME) sessionToken = api.loginAsSystem() props = CustomASServiceExecutionOptions().withParameter('xls', helper.listXlsByteArrays())\ - .withParameter('xls_name', 'ELN-LIMS').withParameter('update_mode', 'UPDATE_IF_EXISTS')\ + .withParameter('xls_name', 'ELN-LIMS').withParameter('update_mode', 'IGNORE_EXISTING')\ .withParameter('scripts', helper.getAllScripts()) result = api.executeCustomASService(sessionToken, CustomASServiceCode("xls-import-api"), props); print("======================== master-data xls ingestion result ========================")