Skip to content
Snippets Groups Projects
Commit efeb25d8 authored by gpawel's avatar gpawel
Browse files

bugfix: weird problem related to jython threading forces us to compile the re...

bugfix: weird problem related to jython threading forces us to compile the re pattern on the script top level (it fails in function's body)

SVN: 25151
parent 01f8ed1d
No related branches found
No related tags found
No related merge requests found
......@@ -27,6 +27,9 @@ INPUT_PATTERN = """
# no '$': allow whitespace at the end
"""
""" due to some weird jython threading issue, we need to compile the pattern outside the function body """
inputPattern = re.compile(INPUT_PATTERN, re.VERBOSE)
"""relationship types shortcuts"""
DEL_REL_TYPE = 'DEL'
......@@ -187,7 +190,6 @@ def updateFromBatchInput(bindings):
elements = []
input = bindings.get('')
if input is not None:
inputPattern = re.compile(INPUT_PATTERN, re.VERBOSE)
plasmids = input.split(',')
for p in plasmids:
(code, g, relationship, annotation) = _group(inputPattern, p.strip())
......@@ -198,8 +200,10 @@ def updateFromBatchInput(bindings):
if parentsInput is not None:
parents = parentsInput.split(',')
for parent in parents:
permId = entityInformationProvider().getSamplePermId(SPACE, parent)
permId = entityInformationProvider().getSamplePermId(SPACE, parent.strip())
parentPlasmids = entityInformationProvider().getSamplePropertyValue(permId, 'PLASMIDS')
if parentPlasmids is None:
continue
parentElements = list(propertyConverter().convertStringToElements(parentPlasmids))
for parentLink in parentElements:
elements.append(parentLink)
......
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