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
Solution
Reorder the usage of the method to ensure that DailyMedication name is updated before Medication name
Problem
Updating
DailyMedication
name requires aMedication
object and reads the name from there. Updating theMedication
name will result in the code being unable to locate theDailyMedication
with the new name as it is still using the old name.Screenshot
Solution
Reorder the usage of the method to ensure that
DailyMedication
name is updated beforeMedication
nameCredits: @e0958902 for finding this bug