From 770f3bf5a20efa28652507e10191392f4077b5f6 Mon Sep 17 00:00:00 2001 From: Viktor Kovtun <viktor.kovtun@id.ethz.ch> Date: Wed, 7 Aug 2019 13:52:06 +0200 Subject: [PATCH] SSDM-8405 Fixing the data initialization problem on the CI server. Using "UPDATE_EXISTING" execution parameter instead of "IGNORE_EXISTING". --- .../core-plugins/eln-lims/1/as/initialize-master-data.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 7bb0dbf5593..d632b954e81 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', 'IGNORE_EXISTING')\ + .withParameter('xls_name', 'ELN-LIMS').withParameter('update_mode', 'UPDATE_EXISTING')\ .withParameter('scripts', helper.getAllScripts()) result = api.executeCustomASService(sessionToken, CustomASServiceCode("xls-import-api"), props); print("======================== master-data xls ingestion result ========================") -- GitLab