handle empty invitation
This commit is contained in:
parent
15791d4e59
commit
d35e16010b
1 changed files with 4 additions and 0 deletions
|
|
@ -145,6 +145,10 @@ export class WorkspaceInvitationService {
|
||||||
groupIds: validGroups?.map((group: Partial<Group>) => group.id),
|
groupIds: validGroups?.map((group: Partial<Group>) => group.id),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
if (invitesToInsert.length < 1) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
invites = await trx
|
invites = await trx
|
||||||
.insertInto('workspaceInvitations')
|
.insertInto('workspaceInvitations')
|
||||||
.values(invitesToInsert)
|
.values(invitesToInsert)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue