class ProjectFinanceFundingSoughtController {

    @GetMapping
    public String viewFundingLevels(@ModelAttribute(name = "form", binding = false) ProjectFinanceFundingSoughtForm form,
                                    @PathVariable long projectId,
                                    Model model) {
        List<ProjectFinanceResource> finances = projectFinanceRestService.getProjectFinances(projectId).getSuccess();
        form.setPartners(finances.stream()
                .collect(toMap(ProjectFinanceResource::getOrganisation,
                        pf -> new ProjectFinancePartnerFundingSoughtForm(pf.getTotalFundingSought()))));
        return viewFunding(projectId, finances, model);
    }

}