Skip to content

Commit d45aa67

Browse files
authored
Fix sample metadata download (#1197)
Fixes incorrect comparison of Long values. Co-authored-by: KochTobi <[email protected]>
1 parent 610145a commit d45aa67

File tree

1 file changed

+2
-1
lines changed
  • project-management-infrastructure/src/main/java/life/qbic/projectmanagement/infrastructure/template/provider/openxml/factory

1 file changed

+2
-1
lines changed

project-management-infrastructure/src/main/java/life/qbic/projectmanagement/infrastructure/template/provider/openxml/factory/SampleInformationFactory.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
import java.util.ArrayList;
55
import java.util.List;
6+
import java.util.Objects;
67
import java.util.Optional;
78
import java.util.function.BinaryOperator;
89
import life.qbic.application.commons.ApplicationException;
@@ -62,7 +63,7 @@ public void enterValuesAsRows(Sheet sheet, CellStyles cellStyles) {
6263
for (Sample sample : samples) {
6364
Row row = XLSXTemplateHelper.getOrCreateRow(sheet, rowIndex);
6465
var experimentalGroup = experimentalGroups.stream()
65-
.filter(group -> group.id() == sample.experimentalGroupId())
66+
.filter(group -> Objects.equals(group.id(), sample.experimentalGroupId()))
6667
.findFirst().orElseThrow();
6768
fillRowWithSampleMetadata(row, sample, experimentalGroup.condition(),
6869
cellStyles.defaultCellStyle(),

0 commit comments

Comments
 (0)