Fix teamId assignment in TeamMemberService

This commit is contained in:
Simon Larsen 2023-11-24 12:16:23 +00:00
parent 8ad344f1f9
commit c82f40443b
No known key found for this signature in database
GPG Key ID: AB45983AA9C81CDE

View File

@ -143,7 +143,9 @@ export class TeamMemberService extends DatabaseService<TeamMember> {
const member: TeamMember | null = await this.findOneBy({ const member: TeamMember | null = await this.findOneBy({
query: { query: {
userId: createBy.data.userId!, userId: createBy.data.userId!,
teamId: new ObjectID(createBy.data.team!._id!), teamId:
createBy.data.teamId ||
new ObjectID(createBy.data.team!._id!),
}, },
props: { props: {
isRoot: true, isRoot: true,