From 39a5a71f11d0f64555705bd3184bc8422a12af31 Mon Sep 17 00:00:00 2001 From: juanf <juanf> Date: Mon, 15 Dec 2014 10:13:03 +0000 Subject: [PATCH] SSDM-1285 : ELN - Peter Lab Migration SVN: 33052 --- .../1/dss/drop-boxes/petermigration/migration.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plasmid/source/core-plugins/petermigration/1/dss/drop-boxes/petermigration/migration.py b/plasmid/source/core-plugins/petermigration/1/dss/drop-boxes/petermigration/migration.py index 01041fdc637..81a1a69389e 100644 --- a/plasmid/source/core-plugins/petermigration/1/dss/drop-boxes/petermigration/migration.py +++ b/plasmid/source/core-plugins/petermigration/1/dss/drop-boxes/petermigration/migration.py @@ -48,7 +48,7 @@ def setEntityProperties(tr, definition, entity, properties): possiblePropertyValue = definitionsVoc.getVocabularyTermCodeForVocabularyAndTermLabel(propertyDefinition[4], propertyValue) if possiblePropertyValue is not None: propertyValue = possiblePropertyValue - else: #We rely on the Add Hock Terms if is None + else: #We rely on the Add Hock Terms if is None, since there is no API we create a new one #Create new vocabulary term vocabulary = tr.getVocabularyForUpdate(propertyDefinition[4]) term = tr.createNewVocabularyTerm() @@ -64,7 +64,7 @@ def setEntityProperties(tr, definition, entity, properties): vocabulary.addTerm(term) #Uses new vocabulary term propertyValue = codeToUse - #print repr(entity.getCode() + ", CREATED FOR VOCABULARY: " + propertyDefinition[4] + ", FOUND VALUE: " + labelToUse + ", NEW TERM WITH CODE: " + codeToUse) + print repr("* ENTITY [" + entity.getCode() + "] created for Vocabulary [" + propertyDefinition[4] + "] not found value: [" + labelToUse + "] new term with code [" + codeToUse + "]") if propertyDefinition is not None: #Sometimes special fields are added for other purposes, these should not be set entity.setPropertyValue(propertyCode, propertyValue) -- GitLab