mirror of
https://github.com/strapi/strapi.git
synced 2025-11-01 18:33:55 +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)
|
||||
.execute();
|
||||
done = batchToDelete.length < batchSize;
|
||||
lastId = batchToDelete[batchToDelete.length - 1]?.id;
|
||||
lastId = batchToDelete[batchToDelete.length - 1]?.id || 0;
|
||||
|
||||
const batchIds = map(inverseJoinColumn.name, batchToDelete);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user