Migrate domainName field from text type to links type (#6410)
Closes #5759.
This commit is contained in:
@ -5,6 +5,8 @@ import { getLogoUrlFromDomainName } from '~/utils';
|
||||
import { getImageAbsoluteURI } from '~/utils/image/getImageAbsoluteURI';
|
||||
import { isDefined } from '~/utils/isDefined';
|
||||
|
||||
import { Company } from '@/companies/types/Company';
|
||||
import { getCompanyDomainName } from '@/object-metadata/utils/getCompanyDomainName';
|
||||
import { getImageIdentifierFieldValue } from './getImageIdentifierFieldValue';
|
||||
|
||||
export const getAvatarUrl = (
|
||||
@ -17,7 +19,9 @@ export const getAvatarUrl = (
|
||||
}
|
||||
|
||||
if (objectNameSingular === CoreObjectNameSingular.Company) {
|
||||
return getLogoUrlFromDomainName(record.domainName ?? '');
|
||||
return getLogoUrlFromDomainName(
|
||||
getCompanyDomainName(record as Company) ?? '',
|
||||
);
|
||||
}
|
||||
|
||||
if (objectNameSingular === CoreObjectNameSingular.Person) {
|
||||
|
||||
Reference in New Issue
Block a user