Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to clear shared profile country value #90

Open
brettski opened this issue Oct 6, 2023 · 0 comments
Open

Unable to clear shared profile country value #90

brettski opened this issue Oct 6, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@brettski
Copy link
Member

brettski commented Oct 6, 2023

Describe the bug
Once a value is set for Country in a shared profile, this value does not clear. Even after clearing the value and saving the value still remains in the data store.

When the value is cleared in the form it is set to undefined, I am thinking it needs to be either empty string or null to clear correctly.

This could be corrected on the api as well if the update method is refactored for the shared profile. Currently an update merges data so if the data isn't in the update object that value remains in the document.
I believe both sites send all data it wants in the record, so this may be the correct action to take

To Reproduce
Steps to reproduce the behavior:

  1. Go to /my/profiles/shared
  2. Ensure you have a profile record saved in the database with a country value
  3. Click on clear the country field value
  4. Save the record
  5. Refresh the page
  6. Notice that the country value comes bace

Expected behavior
The country value should not be retained

@brettski brettski added the bug Something isn't working label Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants