不要怂,就是干,撸起袖子干!

Commit 933b3f62 by Benoit MERIAUX Committed by GitHub

fix(truncate): fix missing `await` in truncate all models with cascade (#12664)

1 parent 490db410
Showing with 1 additions and 1 deletions
......@@ -819,7 +819,7 @@ class Sequelize {
}, { reverse: false });
if (options && options.cascade) {
for (const model of models) model.truncate(options);
for (const model of models) await model.truncate(options);
} else {
await Promise.all(models.map(model => model.truncate(options)));
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!