summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/distinct.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/commands/distinct.cpp')
-rw-r--r--src/mongo/db/commands/distinct.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mongo/db/commands/distinct.cpp b/src/mongo/db/commands/distinct.cpp
index 70a710ff044..53c8497beee 100644
--- a/src/mongo/db/commands/distinct.cpp
+++ b/src/mongo/db/commands/distinct.cpp
@@ -161,8 +161,11 @@ public:
auto viewAggCmd =
OpMsgRequest::fromDBAndBody(nss.db(), viewAggregation.getValue()).body;
- auto viewAggRequest =
- aggregation_request_helper::parseFromBSON(nss, viewAggCmd, verbosity);
+ auto viewAggRequest = aggregation_request_helper::parseFromBSON(
+ nss,
+ viewAggCmd,
+ verbosity,
+ APIParameters::get(opCtx).getAPIStrict().value_or(false));
if (!viewAggRequest.isOK()) {
return viewAggRequest.getStatus();
}