Skip to content
Snippets Groups Projects
Commit 39a5a71f authored by juanf's avatar juanf
Browse files

SSDM-1285 : ELN - Peter Lab Migration

SVN: 33052
parent 00bdf9e9
No related branches found
No related tags found
No related merge requests found
...@@ -48,7 +48,7 @@ def setEntityProperties(tr, definition, entity, properties): ...@@ -48,7 +48,7 @@ def setEntityProperties(tr, definition, entity, properties):
possiblePropertyValue = definitionsVoc.getVocabularyTermCodeForVocabularyAndTermLabel(propertyDefinition[4], propertyValue) possiblePropertyValue = definitionsVoc.getVocabularyTermCodeForVocabularyAndTermLabel(propertyDefinition[4], propertyValue)
if possiblePropertyValue is not None: if possiblePropertyValue is not None:
propertyValue = possiblePropertyValue 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 #Create new vocabulary term
vocabulary = tr.getVocabularyForUpdate(propertyDefinition[4]) vocabulary = tr.getVocabularyForUpdate(propertyDefinition[4])
term = tr.createNewVocabularyTerm() term = tr.createNewVocabularyTerm()
...@@ -64,7 +64,7 @@ def setEntityProperties(tr, definition, entity, properties): ...@@ -64,7 +64,7 @@ def setEntityProperties(tr, definition, entity, properties):
vocabulary.addTerm(term) vocabulary.addTerm(term)
#Uses new vocabulary term #Uses new vocabulary term
propertyValue = codeToUse 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 if propertyDefinition is not None: #Sometimes special fields are added for other purposes, these should not be set
entity.setPropertyValue(propertyCode, propertyValue) entity.setPropertyValue(propertyCode, propertyValue)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment