# HG changeset patch # User Mike Becker # Date 1589900158 -7200 # Node ID d15779cf398257f010f46cba6ad2aac25da1c72b # Parent 635ae67e73b5be464d4f336171c1b087f007ed4c adds request attribute users in edit() handler diff -r 635ae67e73b5 -r d15779cf3982 src/main/java/de/uapcore/lightpit/modules/ProjectsModule.java --- a/src/main/java/de/uapcore/lightpit/modules/ProjectsModule.java Tue May 19 16:51:08 2020 +0200 +++ b/src/main/java/de/uapcore/lightpit/modules/ProjectsModule.java Tue May 19 16:55:58 2020 +0200 @@ -96,10 +96,10 @@ @RequestMapping(requestPath = "edit", method = HttpMethod.GET) public ResponseType edit(HttpServletRequest req, DataAccessObjects dao) throws SQLException { - final var projectDao = dao.getProjectDao(); + req.setAttribute("project", findByParameter(req, Integer.class, "id", + dao.getProjectDao()::find).orElse(new Project(-1))); + req.setAttribute("users", dao.getUserDao().list()); - req.setAttribute("project", findByParameter(req, Integer.class, "id", - projectDao::find).orElse(new Project(-1))); setDynamicFragment(req, "project-form"); return ResponseType.HTML;