AY2324S2-CS2113T-T09-1 / tp

0 stars 6 forks source link

bug: Modify command updates Medication name before DailyMedication name #245

Closed wenenhoe closed 7 months ago

wenenhoe commented 7 months ago

Problem

Updating DailyMedication name requires a Medication object and reads the name from there. Updating the Medication name will result in the code being unable to locate the DailyMedication with the new name as it is still using the old name.

Screenshot

photo_2024-04-15_12-46-08

Solution

Reorder the usage of the method to ensure that DailyMedication name is updated before Medication name

Credits: @e0958902 for finding this bug