Skip to content

Commit 6c62e5d

Browse files
committed
Support not yet created aliquot parents
1 parent a4b6bf3 commit 6c62e5d

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

experiment/src/org/labkey/experiment/ExpDataIterators.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3263,6 +3263,11 @@ else if (aliquotedFromObj instanceof Number)
32633263
_row[_aliquotNameCol] = List.of(aliquotParent.getName());
32643264
_row[_aliquotRowIdCol] = aliquotParent.getRowId();
32653265
}
3266+
else
3267+
{
3268+
// The referenced sample may not exist yet (e.g. it may be created in the same import)
3269+
_row[_aliquotNameCol] = aliquotedFromObj.toString();
3270+
}
32663271
}
32673272
catch (ValidationException e)
32683273
{

experiment/src/org/labkey/experiment/api/SampleTypeUpdateServiceDI.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1997,6 +1997,8 @@ public String nextName(Map<String, Object> map,
19971997
Object name = map.get(ALIQUOT_FROM_RESOLVED_NAME);
19981998
if (name instanceof String aliquotParentName)
19991999
map.put(ExpMaterial.ALIQUOTED_FROM_INPUT, aliquotParentName);
2000+
else if (name instanceof List<?> nameList)
2001+
map.put(ExpMaterial.ALIQUOTED_FROM_INPUT, nameList.get(0));
20002002
}
20012003

20022004
String generatedName = null;

0 commit comments

Comments
 (0)