fix-discord-timeline (#11784)

In some cases, the person is undefined so we fallback on the
workspacemember, and sometimes he is missing the firstname/lastname.

Not sure how this can happen, but one user experiencd such a thing so
better to catch this


![image](https://github.com/user-attachments/assets/c91445fe-365e-4fc9-bf14-69f71d344aa7)

fix https://discord.com/channels/1130383047699738754/1366145144838951022

close https://github.com/twentyhq/core-team-issues/issues/918
This commit is contained in:
Guillim
2025-04-30 15:11:00 +02:00
committed by GitHub
parent 0439b96eca
commit 357649db95

View File

@ -86,7 +86,9 @@ export function formatResult<T>(
for (const [key, value] of Object.entries(data)) {
const compositePropertyArgs = compositeFieldMetadataMap.get(key);
const fieldMetadata = objectMetadataItemWithFieldMaps.fieldsById[key];
const fieldMetadata = objectMetadataItemWithFieldMaps.fieldsByName[key];
const isRelation = fieldMetadata
? isFieldMetadataInterfaceOfType(
fieldMetadata,