Fix delete workspace-member avatar (#9630)

## Context
avatarUrl is a TEXT field type so non nullable, which means if we try to
run a mutation with null it will either fail or be ignored. Here this is
the second option, done in sanitizeRecordInput where when a
fieldMetadata has isNullable=false and the value is null, we return
undefined. This caused the mutation to send an empty input and not
remove the avatar
This commit is contained in:
Weiko
2025-01-15 11:26:39 +01:00
committed by GitHub
parent fc484bde2d
commit 5d0ec9116f
2 changed files with 2 additions and 2 deletions

View File

@ -91,7 +91,7 @@ export const ProfilePictureUploader = () => {
await updateOneRecord({
idToUpdate: currentWorkspaceMember?.id,
updateOneRecordInput: {
avatarUrl: null,
avatarUrl: '',
},
});