fix: ids not empty

This commit is contained in:
chenos 2021-01-10 09:40:29 +08:00
parent b81b83d3f3
commit 30b006bb45

View File

@ -238,7 +238,7 @@ export class CollectionModel extends BaseModel {
ids.push(model.id); ids.push(model.id);
} }
} }
if (collection.get('internal')) { if (ids.length && collection.get('internal')) {
await collection.updateAssociations({ await collection.updateAssociations({
[key]: ids, [key]: ids,
}); });