Skip to content

Commit

Permalink
fix(ModelQueryBuilder): fix the check soft deletes of model
Browse files Browse the repository at this point in the history
  • Loading branch information
LookinGit committed Aug 22, 2021
1 parent 29e5311 commit 8939b75
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Bindings/ModelQueryBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')
}
}
Expand Down

0 comments on commit 8939b75

Please sign in to comment.