Skip to content
Snippets Groups Projects

Resolve "[Queue-2.0] Unenrolling from an edition causes blocked status"

Files

@@ -26,6 +26,7 @@ import nl.tudelft.labracore.api.dto.StudentGroupDetailsDTO;
import nl.tudelft.labracore.api.dto.StudentGroupSummaryDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.lang.Nullable;
import org.springframework.stereotype.Component;
import org.springframework.web.context.annotation.RequestScope;
@@ -60,7 +61,10 @@ public class StudentGroupCacheManager extends CoreCacheManager<Long, StudentGrou
}
@Override
protected List<StudentGroupDetailsDTO> fetch(List<Long> ids) {
protected List<StudentGroupDetailsDTO> fetch(@Nullable List<Long> ids) {
if (ids == null || ids.isEmpty()) {
return List.of();
}
return api.getStudentGroupsById(ids).collectList().block();
}
Loading