The error is resulted from line 28 of file server/api/views/listMeds/views.py when using remove without verifying whether an item is in the list. I fixed this using a filter for the meds to exclude instead of using the remove function.
In light of this error, I also found out that in some cases, a medication line can be empty, so I add a placeholder "None" in place of the medication and changed the frontend so that there would be no "risks and benefits" clicking option for "None".
The error is resulted from line 28 of file
server/api/views/listMeds/views.py
when usingremove
without verifying whether an item is in the list. I fixed this using a filter for the meds to exclude instead of using theremove
function.In light of this error, I also found out that in some cases, a medication line can be empty, so I add a placeholder "None" in place of the medication and changed the frontend so that there would be no "risks and benefits" clicking option for "None".