diff --git a/packages/lib/person/service.ts b/packages/lib/person/service.ts index 8290636cbbc..00357431f4e 100644 --- a/packages/lib/person/service.ts +++ b/packages/lib/person/service.ts @@ -305,7 +305,9 @@ export const getPersonByUserId = async (environmentId: string, userId: string): select: selectPerson, }); - if (personWithUserId) { + return personWithUserId ? transformPrismaPerson(personWithUserId) : null; + + /* if (personWithUserId) { return transformPrismaPerson(personWithUserId); } @@ -350,9 +352,9 @@ export const getPersonByUserId = async (environmentId: string, userId: string): id: personWithUserIdAttribute.id, environmentId, userId, - }); + }); - return transformPrismaPerson(personWithUserIdAttribute); + return transformPrismaPerson(personWithUserIdAttribute); */ }, [`getPersonByUserId-${environmentId}-${userId}`], {