Skip to content

Commit

Permalink
Fixed json deserialization
Browse files Browse the repository at this point in the history
Fixed a bug that occurred when trying to use UsosStudentProgramme properties returned in student() method
  • Loading branch information
pszumanski committed Apr 30, 2024
1 parent 2591c4b commit 9f16e33
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,11 @@ public UsosStage stage(UsosStageParam params) {
UsosStage.class);
}

@SuppressWarnings("unchecked")
public List<UsosStudentProgramme> student() {
return requestWithAccessToken(requestFactory.get(
return List.of(requestWithAccessToken(requestFactory.get(
"services/progs/student",
FieldSelector.fromRequest(UsosStudentProgramme.class)),
List.class);
UsosStudentProgramme[].class));
}

public UsosStudentProgramme studentProgramme(UsosStudentProgrammeParam params) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ void stage() {
@Test
void student() {
log(userApi.progs().student());
log(userApi.progs().student().get(0).programme().id());
}

@Test
Expand Down

0 comments on commit 9f16e33

Please # to comment.