UBERF-8848: Fix github account link (#7391)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev 2024-12-09 16:28:38 +07:00 committed by GitHub
parent aa51f34bf2
commit 7b2bdb2c65
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -416,7 +416,7 @@ export class GithubWorker implements IntegrationManager {
private async findPerson (userInfo: UserInfo, userName: string): Promise<Ref<Person>> { private async findPerson (userInfo: UserInfo, userName: string): Promise<Ref<Person>> {
let person: Ref<Person> | undefined let person: Ref<Person> | undefined
// try to find by account. // try to find by account.
if (userInfo.email != null) { if (userInfo.email != null && userInfo.email.trim().length > 0) {
const personAccount = await this.liveQuery.findOne(contact.class.PersonAccount, { email: userInfo.email }) const personAccount = await this.liveQuery.findOne(contact.class.PersonAccount, { email: userInfo.email })
person = personAccount?.person person = personAccount?.person
} }