Null - Fix emails field (#16317)
fixes https://github.com/twentyhq/twenty/issues/16270 It happens with api user only. Integration tests were ok because we expect a returned empty string (check in test) even if null value is expected in db (not test). How can we improve this ?
This commit is contained in:
+1
-1
@@ -10,7 +10,7 @@ export const transformEmailsValue = (
|
||||
}
|
||||
|
||||
let additionalEmails: string | null = value?.additionalEmails;
|
||||
const primaryEmail = value?.primaryEmail
|
||||
const primaryEmail = isNonEmptyString(value?.primaryEmail)
|
||||
? value.primaryEmail.toLowerCase()
|
||||
: null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user