Skip to content
This repository has been archived by the owner on Mar 13, 2020. It is now read-only.

Commit

Permalink
Merge pull request #23 from chenshoo/master
Browse files Browse the repository at this point in the history
fix: conditions
  • Loading branch information
chenshoo authored Jun 10, 2019
2 parents 9819939 + 05ab599 commit 8aaef2f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/schema-helpers/middleware-setters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ export const addQueryMiddleware = (
schema.pre(middleware, findHandlerFunc as any);
},
);
schema.pre('aggregate', preAggregate);
if (!mongoConfiguration || !mongoConfiguration.softDeleteReturnEntities) {
schema.pre('aggregate', preAggregate);
}
if (
!mongoConfiguration ||
(mongoConfiguration && mongoConfiguration.allowSoftDelete !== false)
Expand Down

0 comments on commit 8aaef2f

Please sign in to comment.