Uh oh!
There was an error while loading. Please reload this page.
fix: not able to update user prefs - #370
Conversation
@safwanyp is attempting to deploy a commit to the appwrite Team on Vercel. A member of the Team first needs to authorize it. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
| } else if (prefs[prefs.length - 1][0] === '' || prefs[prefs.length - 1][1] === '') { | ||
| arePrefsDisabled = false; |
There was a problem hiding this comment.
Whoops. Didn't acciunt for this. Will update soon.
safwanyp
commented
Mar 29, 2023
@TorstenDittmann seems like it was a simple mistake I made while using OR instead of AND lol. Please have a look and let me know if you spot any more issues! |
TorstenDittmann
left a comment
There was a problem hiding this comment.
Bildschirmaufnahme.2023-03-29.um.17.56.22.mov
looks like we do have some weird conditions here.
Now that I think about it, we might wanna allow empty key or empty values. Since this is possible from the API - we should respect that here.
But than we need to be careful, because 2 empty keys will delete one of them
safwanyp
commented
Mar 29, 2023
That's interesting. So we allow as many empty values as needed, but restrict the number of empty keys to 1? |
safwanyp
commented
Apr 1, 2023
Hey @TorstenDittmann
Pinging you for this clarification ^ |
stnguyen90
commented
Dec 29, 2023
Definitely no more than 1 of the same key because you can't have 2 key-value pairs with the same key. |

What does this PR do?
This PR fixes an issue where User Preferences could not be updated in the Appwrite console.
Fixes: #1468
Test Plan
npm testRelated PRs and Issues
Have you read the Contributing Guidelines on issues?
Yes. I ran the linter, formatter, and checks to ensure my code follows the same standard as the original code.