Skip to content

Commit

Permalink
Small tweak to clean up code.
Browse files Browse the repository at this point in the history
  • Loading branch information
bseeger committed Jun 3, 2024
1 parent 984b516 commit 9b0744e
Showing 1 changed file with 2 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,10 @@ public boolean preHandle(HttpServletRequest request, @NotNull HttpServletRespons
return false;
}

UUID submissionId;
UUID submissionId = null;
try {
submissionId = FormFlowController.getSubmissionIdForFlow(session, parsedUrl.get("flow"));
} catch (ResponseStatusException e) {
submissionId = null;
} catch (ResponseStatusException ignored) {
}

if (submissionId == null && !parsedUrl.get("screen").equals(firstScreen)) {
Expand All @@ -89,14 +88,6 @@ public boolean preHandle(HttpServletRequest request, @NotNull HttpServletRespons
return false;
}

if (submissionId == null && !parsedUrl.get("screen").equals(firstScreen)) {
//if (FormFlowController.getSubmissionIdForFlow(session, parsedUrl.get("flow")) == null &&
// !parsedUrl.get("screen").equals(firstScreen)) {
log.error("A submission ID was not found in the session for request to {}. Redirecting to landing page.",
request.getRequestURI());
return false;
}

return true;
}

Expand Down

0 comments on commit 9b0744e

Please sign in to comment.