Fix phone not empty filter (#15790)

This PR fixes the filter on not empty phones.

We can end up with phone numbers that only have a country code, but it
makes no sense to consider this special edge case "not empty".

If we have no phone number, then it's empty, so this PR applies this
particular use case for NOT EMPTY filter on phone fields.

Fixes https://github.com/twentyhq/twenty/issues/15638
This commit is contained in:
Lucas Bordeau
2025-11-13 14:38:56 +01:00
committed by GitHub
parent 3ef9be6622
commit dd0601ab6f
2 changed files with 0 additions and 42 deletions
@@ -740,20 +740,6 @@ describe('should work as expected for the different field types', () => {
},
],
},
{
or: [
{
phones: {
primaryPhoneCallingCode: { is: 'NULL' },
},
},
{
phones: {
primaryPhoneCallingCode: { ilike: '' },
},
},
],
},
{
or: [
{
@@ -787,20 +773,6 @@ describe('should work as expected for the different field types', () => {
},
],
},
{
or: [
{
phones: {
primaryPhoneCallingCode: { is: 'NULL' },
},
},
{
phones: {
primaryPhoneCallingCode: { ilike: '' },
},
},
],
},
{
or: [
{
@@ -70,20 +70,6 @@ export const getEmptyRecordGqlOperationFilter = ({
},
],
},
{
or: [
{
[correspondingField.name]: {
primaryPhoneCallingCode: { is: 'NULL' },
} as PhonesFilter,
},
{
[correspondingField.name]: {
primaryPhoneCallingCode: { ilike: '' },
} as PhonesFilter,
},
],
},
{
or: [
{