fix: error when no ids
This commit is contained in:
parent
6580c17273
commit
990a4687fd
1 changed files with 3 additions and 5 deletions
|
|
@ -402,11 +402,9 @@ export class ServiceController extends Controller {
|
|||
...payload,
|
||||
statusOrder: +(payload.status === "INACTIVE"),
|
||||
work: {
|
||||
deleteMany: {
|
||||
id: work?.some((v) => !!v.id)
|
||||
? { notIn: work.flatMap((v) => (!!v.id ? v.id : [])) }
|
||||
: undefined,
|
||||
},
|
||||
deleteMany: work?.some((v) => !!v.id)
|
||||
? { id: { notIn: work.flatMap((v) => (!!v.id ? v.id : [])) } }
|
||||
: {},
|
||||
upsert: (work || []).map((w, wIdx) => ({
|
||||
where: { id: w.id },
|
||||
create: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue