Skip to content

Commit f4236a6

Browse files
committed
Merge remote-tracking branch 'origin/develop' into fb_deriveActions
2 parents eece868 + 22e06f2 commit f4236a6

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

api/src/org/labkey/api/reader/DataLoader.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -729,6 +729,7 @@ protected final Map<String, Object> convertValues(Object[] fields)
729729
boolean foundData = false;
730730
for (int i = 0; i < _activeColumns.length; i++)
731731
{
732+
boolean isEmptyArray = false;
732733
ColumnDescriptor column = _activeColumns[i];
733734
if (_preserveEmptyString && null == column.missingValues)
734735
{
@@ -831,6 +832,12 @@ else if (column.clazz == MultiChoice.Array.class)
831832
// GitHub Issue 925: Not providing a MVTC value in an assay result throws error
832833
// convert blank to empty array, not null
833834
values[i] = column.converter.convert(column.clazz, fld);
835+
if (values[i] instanceof MultiChoice.Array array) // TODO: make this more generic? instanceof List and/or instanceof java.sql.Array?
836+
{
837+
// If line is blank, array will be empty array instead of null
838+
if (array.isEmpty())
839+
isEmptyArray = true;
840+
}
834841
}
835842
else
836843
{
@@ -878,7 +885,7 @@ else if (ERROR_VALUE_USE_ORIGINAL.equals(column.errorValues))
878885
values[i] = column.errorValues;
879886
}
880887

881-
if (values[i] != null)
888+
if (values[i] != null && !isEmptyArray)
882889
foundData = true;
883890
}
884891

0 commit comments

Comments
 (0)