Skip to content
Snippets Groups Projects
Commit a00bb51e authored by Sven Kästle's avatar Sven Kästle
Browse files

fix: retun representation only if it is not null

parent c5b6c3d6
No related branches found
No related tags found
No related merge requests found
......@@ -449,11 +449,13 @@ public class SubmissionController implements ISubmission {
ArrayList<SubmissionProjectRepresentation> representations = new ArrayList<>();
while (rs.next()) {
representations.add(new SubmissionProjectRepresentation(
rs.getString("userId"),
Category.valueOf(rs.getString("category").toUpperCase()),
rs.getString("fullSubmissionId")
));
if (!Strings.isNullOrEmpty(rs.getString("category"))) {
representations.add(new SubmissionProjectRepresentation(
rs.getString("userId"),
Category.valueOf(rs.getString("category").toUpperCase()),
rs.getString("fullSubmissionId")
));
}
}
return representations;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment