Skip to content
Snippets Groups Projects
Commit 997b00d4 authored by barillac's avatar barillac
Browse files

bugfix in children copy

SVN: 33539
parent f9bda45e
No related branches found
No related tags found
No related merge requests found
...@@ -249,7 +249,14 @@ def copySample(tr, parameters, tableBuilder): ...@@ -249,7 +249,14 @@ def copySample(tr, parameters, tableBuilder):
if sampleChildren != None: if sampleChildren != None:
for sampleChildIdentifier in sampleChildren: for sampleChildIdentifier in sampleChildren:
child = tr.getSample(sampleChildIdentifier); #Retrieve Sample child to copy child = tr.getSample(sampleChildIdentifier); #Retrieve Sample child to copy
copyChildCode = parameters.get("sampleCode") + child.getCode()[child.getCode().index('_'):];
copyChildCode = None
try: #For autogenerated children that have the code as sufix
indexFromCopiedChildrenParentCode = child.getCode().index('_')
copyChildCode = parameters.get("sampleCode") + child.getCode()[indexFromCopiedChildrenParentCode:];
except: #For all other children
copyChildCode = parameters.get("sampleCode") + "_" + child.getCode();
copyChildIdentifier = "/" + parameters.get("sampleSpace") + "/" + copyChildCode; copyChildIdentifier = "/" + parameters.get("sampleSpace") + "/" + copyChildCode;
# Create new sample children # Create new sample children
......
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