Fix link formatting (#13210)
closes https://github.com/twentyhq/twenty/issues/13207 --------- Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
This commit is contained in:
@ -79,11 +79,10 @@ describe('spreadsheetImportGetUnicityRowHook', () => {
|
||||
|
||||
it('should return row with error if row is not unique - index on composite field', () => {
|
||||
const hook = spreadsheetImportGetUnicityRowHook(mockObjectMetadataItem);
|
||||
|
||||
const testData: ImportedStructuredRow<string>[] = [
|
||||
{ 'Link URL (domainName)': 'duplicaTe.com' },
|
||||
{ 'Link URL (domainName)': 'duplicate.com ' },
|
||||
{ 'Link URL (domainName)': 'other.com' },
|
||||
{ 'Link URL (domainName)': 'https://duplicaTe.com' },
|
||||
{ 'Link URL (domainName)': 'https://duplicate.com' },
|
||||
{ 'Link URL (domainName)': 'https://other.com' },
|
||||
];
|
||||
|
||||
const addErrorMock = jest.fn();
|
||||
|
||||
@ -12,7 +12,7 @@ import { isNonEmptyString } from '@sniptt/guards';
|
||||
import { FieldMetadataType } from 'twenty-shared/types';
|
||||
import {
|
||||
isDefined,
|
||||
lowercaseUrlAndRemoveTrailingSlash,
|
||||
lowercaseUrlOriginAndRemoveTrailingSlash,
|
||||
} from 'twenty-shared/utils';
|
||||
|
||||
type Column = {
|
||||
@ -108,7 +108,7 @@ const getUniqueValues = (
|
||||
.primaryLinkUrl,
|
||||
)
|
||||
) {
|
||||
return lowercaseUrlAndRemoveTrailingSlash(
|
||||
return lowercaseUrlOriginAndRemoveTrailingSlash(
|
||||
row?.[columnName]?.toString().trim() || '',
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user