From 5dc233ab1622e1be37a574eab89e87f54a86b56e Mon Sep 17 00:00:00 2001 From: mertmit Date: Tue, 14 Jun 2022 20:59:55 +0300 Subject: [PATCH] fix(sync): handle existing user on project Signed-off-by: mertmit --- packages/nocodb/src/lib/meta/api/sync/helpers/job.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/nocodb/src/lib/meta/api/sync/helpers/job.ts b/packages/nocodb/src/lib/meta/api/sync/helpers/job.ts index ba894d40fe..162a33a1e6 100644 --- a/packages/nocodb/src/lib/meta/api/sync/helpers/job.ts +++ b/packages/nocodb/src/lib/meta/api/sync/helpers/job.ts @@ -1628,10 +1628,11 @@ export default async ( ); const _perfStart = recordPerfStart(); insertJobs.push( - api.auth.projectUserAdd(ncCreatedProjectSchema.id, { - email: value.email, - roles: userRoles[value.permissionLevel] - }) + api.auth.projectUserAdd(ncCreatedProjectSchema.id, { + email: value.email, + roles: userRoles[value.permissionLevel] + }) + .catch(e => e.response?.data?.msg ? logBasic(`NOTICE: ${e.response.data.msg}`) : console.log(e)) ); recordPerfStats(_perfStart, 'auth.projectUserAdd'); }