codeforpdx / PASS

PASS project - with HMIS module integration
MIT License
28 stars 25 forks source link

[Bug Report] - Contacts deletion fails when name fields are null #585

Closed leekahung closed 7 months ago

leekahung commented 7 months ago

Describe the bug:

Recently, we've made the name fields for users to be optional. While the new functionality works as intended, a new bug appears when the name fields are null (see clip below).

https://github.com/codeforpdx/PASS/assets/14917816/97406843-705d-48bc-9f92-4dcde585df64

As shown above, the contact fails to delete when triggered with the notification also saying the user's been deleted. However, the user had yet to be deleted from userlist.ttl on Solid.

However, if we were to include names with the new optional name fields, the user gets deleted as intended (see clip below).

https://github.com/codeforpdx/PASS/assets/14917816/088759cd-2c0e-4e76-925e-33cefeea15c7

Expected behavior:

Ideally, we expect both of these cases to work when deleting someone from the user list in contacts.

Possible Fix:

Refactor/create conditions to handle potential nulls in the delete contact function.

leekahung commented 7 months ago

Had just retested the feature on Development. This bug doesn't seem to be there anymore. Closing issue.