fix: cannot remove user
This commit is contained in:
parent
185e76b7e9
commit
6002b6b1a7
1 changed files with 11 additions and 6 deletions
|
|
@ -272,12 +272,17 @@ export class FlowTemplateController extends Controller {
|
|||
deleteMany: {},
|
||||
create: v.value?.map((val) => ({ value: val })),
|
||||
},
|
||||
responsiblePerson: {
|
||||
createMany: {
|
||||
data: v.responsiblePersonId?.map((id) => ({ userId: id })) || [],
|
||||
skipDuplicates: true,
|
||||
},
|
||||
},
|
||||
responsiblePerson: v.responsiblePersonId
|
||||
? {
|
||||
deleteMany: {
|
||||
userId: { notIn: v.responsiblePersonId },
|
||||
},
|
||||
createMany: {
|
||||
data: v.responsiblePersonId?.map((id) => ({ userId: id })) || [],
|
||||
skipDuplicates: true,
|
||||
},
|
||||
}
|
||||
: undefined,
|
||||
responsibleInstitution: {
|
||||
deleteMany: {},
|
||||
create: v.responsibleInstitution?.map((group) => ({ group })),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue