diff options
-rw-r--r-- | src/mongo/s/commands/cluster_find_and_modify_cmd.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/s/commands/cluster_find_and_modify_cmd.cpp b/src/mongo/s/commands/cluster_find_and_modify_cmd.cpp index 54252bce4d7..4a108edb575 100644 --- a/src/mongo/s/commands/cluster_find_and_modify_cmd.cpp +++ b/src/mongo/s/commands/cluster_find_and_modify_cmd.cpp @@ -658,8 +658,8 @@ private: IDLParserContext("ClusterFindAndModify"), cmdObj); auto sharedBlock = std::make_shared<SharedBlock>(nss, cmdObj); - sharedBlock->clusterQueryCommand = ClusterQueryWithoutShardKey( - cmdObj, *parsedRequest.getStmtId() ? *parsedRequest.getStmtId() : 0); + sharedBlock->clusterQueryCommand = + ClusterQueryWithoutShardKey(cmdObj, parsedRequest.getStmtId().value_or(0)); auto txn = txn_api::SyncTransactionWithRetries( opCtx, |