Skip to content
Snippets Groups Projects
Commit dd552f49 authored by Antoine Rey's avatar Antoine Rey
Browse files

Fix #108 owner update

parent 3bcf8454
No related branches found
No related tags found
No related merge requests found
......@@ -111,10 +111,11 @@ public class OwnerController {
}
@RequestMapping(value = "/owners/{ownerId}/edit", method = RequestMethod.POST)
public String processUpdateOwnerForm(@Valid Owner owner, BindingResult result) {
public String processUpdateOwnerForm(@Valid Owner owner, @PathVariable("ownerId") int ownerId, BindingResult result) {
if (result.hasErrors()) {
return "owners/createOrUpdateOwnerForm";
} else {
owner.setId(ownerId);
this.clinicService.saveOwner(owner);
return "redirect:/owners/{ownerId}";
}
......
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