Resolve "getOrHandleAndThrow for an 1 entity."
Closes #12 (closed)
Merge request reports
Activity
added difficultylow label
assigned to @hpage
Allows for things like this:
@GetMapping("/lab/{qSession}/copy") @PreAuthorize("@permissionService.canManageSession(#qSession)") public String getLabCopyView(@PathEntity QueueSession<?> qSession, Model model) { var session = sCache.getRequired(qSession.getSession(), id -> ls.deleteSession(qSession)); // <---- model.addAttribute("dto", qSession.copyLabCreateDTO(session)); model.addAttribute("lType", qSession.getType()); setSessionEditingPageAttributes(qSession, model); return "lab/create/" + qSession.getType().name().toLowerCase(); }
This can occur if, somehow, the session is magically deleted from core, and the user is still trying to interact with the old lab.
requested review from @rwbackx
mentioned in commit df824eb2
Please register or sign in to reply