mirror of
https://github.com/strapi/strapi.git
synced 2025-11-18 19:22:05 +00:00
Fix knex error when removing existing relations as a batch
Added a fallback of 0 after null coalesce
This commit is contained in:
parent
6000668673
commit
975a3ca03d
@ -152,7 +152,7 @@ const deleteRelations = async ({
|
|||||||
.transacting(trx)
|
.transacting(trx)
|
||||||
.execute();
|
.execute();
|
||||||
done = batchToDelete.length < batchSize;
|
done = batchToDelete.length < batchSize;
|
||||||
lastId = batchToDelete[batchToDelete.length - 1]?.id;
|
lastId = batchToDelete[batchToDelete.length - 1]?.id || 0;
|
||||||
|
|
||||||
const batchIds = map(inverseJoinColumn.name, batchToDelete);
|
const batchIds = map(inverseJoinColumn.name, batchToDelete);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user