CodeForPhilly / balancer-main

CodeForPhilly balancer project (https://opencollective.com/code-for-philly/projects/balancer)
GNU Affero General Public License v3.0
11 stars 8 forks source link

Hotfix for server 500 error #119

Closed Tom-from-6520 closed 3 months ago

Tom-from-6520 commented 3 months ago

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".