fix: await document exists

This commit is contained in:
Marc-Roig 2025-02-20 15:56:05 +01:00
parent 0a60ac747a
commit 242fecbcf1
No known key found for this signature in database
GPG Key ID: FB4E2C43A0BEE249

View File

@ -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');