-
Notifications
You must be signed in to change notification settings - Fork 24.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pet details are not updated #1752
Comments
Hey ! |
It seems that I cannot assign anybody to the issue, I dont know why, but feel free to fix the issue. |
Okey ! |
Hello ! |
The solution is good and solves the problem. I would only suggest to put the whole logic with the for loop into a new method in the Owner (maybe call it updatePet). And I am not sure why you renamed the PetController to privatePetController. |
Okey...sure ! I will correct the things. |
I have created a new PR. Please review it ! |
Example: go to first owner with pet Leo of type cat.
Click on edit pet and change the type to bird or change the name.
Click on Update pet.
The pet is not updated, even though a success message is shown.
When I analysed the code, I found that the updated pet is given to the addPet method of the owner which does not change the pet in the owner list, as the pet is not new.
In PetController:
The text was updated successfully, but these errors were encountered: