mirror of
https://github.com/strapi/strapi.git
synced 2026-01-08 05:04:10 +00:00
fix: await document exists
This commit is contained in:
parent
0a60ac747a
commit
242fecbcf1
@ -420,7 +420,7 @@ export default {
|
||||
const isUpdate = !isCreate;
|
||||
if (isUpdate) {
|
||||
// check if the document exists
|
||||
const documentExists = documentManager.exists(model, id)!;
|
||||
const documentExists = await documentManager.exists(model, id);
|
||||
|
||||
if (!documentExists) {
|
||||
throw new errors.NotFoundError('Document not found');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user