mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-21 14:55:51 +00:00
change
This commit is contained in:
parent
4cbbce27d1
commit
dda5b23980
1 changed files with 2 additions and 0 deletions
|
@ -13,6 +13,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.samples.petclinic.owner;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
|
@ -98,6 +99,7 @@ class PetController {
|
|||
|
||||
@PostMapping("/pets/{petId}/edit")
|
||||
public String processUpdateForm(@Valid Pet pet, BindingResult result, Owner owner, ModelMap model) {
|
||||
System.out.println("");
|
||||
if (result.hasErrors()) {
|
||||
pet.setOwner(owner);
|
||||
model.put("pet", pet);
|
||||
|
|
Loading…
Reference in a new issue