Skip to content

Commit

Permalink
SapienzaExamHandler: Fix OPIS survey not being retrieved
Browse files Browse the repository at this point in the history
  • Loading branch information
leosarra committed Nov 27, 2019
1 parent dd61161 commit 1544cb1
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,8 @@ private ImmutablePair<Integer, String> _insertReservation(ExamReservation res) t
nota = response.getJSONObject("esito").getString("nota");
}
} else throw new OpenstudInvalidResponseException("Infostud answer is not valid");
if (!response.isNull("url") && response.has("url")) url = response.getString("url");
if (response.has("urlOpis") && !response.isNull("urlOpis")) url = response.getString("urlOpis");
else if (response.has("url") && !response.isNull("url")) url = response.getString("url");
if (url == null && flag != 0 && (nota == null || !nota.contains("già prenotato"))) return null;
return new ImmutablePair<>(flag, url);
} catch (IOException e) {
Expand Down

0 comments on commit 1544cb1

Please sign in to comment.