Skip to content

Commit b68a121

Browse files
committed
curationstatus ordering fix
1 parent b3e1c78 commit b68a121

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/main/java/edu/harvard/iq/dataverse/DatasetVersion.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2159,6 +2159,13 @@ public String getLocaleLastUpdateTime() {
21592159

21602160
// Add methods to manage curationLabels
21612161
public List<CurationStatus> getCurationStatuses() {
2162+
// Sort the list to ensure null createTime values appear last
2163+
if (curationStatuses != null) {
2164+
curationStatuses.sort(Comparator.comparing(
2165+
CurationStatus::getCreateTime,
2166+
Comparator.nullsLast(Comparator.reverseOrder())
2167+
));
2168+
}
21622169
return curationStatuses;
21632170
}
21642171

0 commit comments

Comments
 (0)