Skip to content
Snippets Groups Projects
Verified Commit ac679591 authored by Ruben Backx's avatar Ruben Backx :coffee:
Browse files

Use correct session ID for export

parent 661b4da4
Branches
Tags
2 merge requests!675Deploy,!666Resolve "Incorrect session names when exporting all labs"
...@@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ...@@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed ### Changed
### Fixed ### Fixed
- Session names in the edition export did not correspond to the correct sessions. [@rwbackx](https://gitlab.ewi.tudelft.nl/rwbackx)
### Deprecated ### Deprecated
... ...
......
...@@ -168,7 +168,7 @@ public class LabService { ...@@ -168,7 +168,7 @@ public class LabService {
header = LabRequestViewDTO.csvHeader(); header = LabRequestViewDTO.csvHeader();
} }
String[] finalHeader = header; String[] finalHeader = header;
String name = sCache.getRequired(qSession.getId(), id -> deleteSession(qSession)).getName(); String name = sCache.getRequired(qSession.getSession(), id -> deleteSession(qSession)).getName();
var requests = rts.convertRequestsToView(qSession.getRequests()); var requests = rts.convertRequestsToView(qSession.getRequests());
return fs.writeTempResource("session-" + name + "-" + requests.hashCode() + ".csv", return fs.writeTempResource("session-" + name + "-" + requests.hashCode() + ".csv",
() -> CsvHelper.writeCsvValues(finalHeader, requests, ',')); () -> CsvHelper.writeCsvValues(finalHeader, requests, ','));
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment