From 8939b75e67e573146682df47d8f682e2402dd09e Mon Sep 17 00:00:00 2001 From: LookinGit Date: Sun, 22 Aug 2021 09:16:34 +0500 Subject: [PATCH] fix(ModelQueryBuilder): fix the check soft deletes of model --- src/Bindings/ModelQueryBuilder.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Bindings/ModelQueryBuilder.ts b/src/Bindings/ModelQueryBuilder.ts index a84a2fe..9a49b85 100644 --- a/src/Bindings/ModelQueryBuilder.ts +++ b/src/Bindings/ModelQueryBuilder.ts @@ -15,7 +15,7 @@ import { Exception } from '@poppinss/utils' * Raises exception when model not with soft delete */ function ensureModelWithSoftDeletes (model: LucidModel) { - if (!('$ignoreDeleted' in model)) { + if (!('ignoreDeleted' in model && 'ignoreDeletedPaginate' in model)) { throw new Exception(`${model.name} model don't support Soft Deletes`, 500, 'E_MODEL_SOFT_DELETE') } }