diff options
Diffstat (limited to 'src/mongo/db/auth/role_graph_update.cpp')
-rw-r--r-- | src/mongo/db/auth/role_graph_update.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/db/auth/role_graph_update.cpp b/src/mongo/db/auth/role_graph_update.cpp index 6236bcc50ae..71e9370ec61 100644 --- a/src/mongo/db/auth/role_graph_update.cpp +++ b/src/mongo/db/auth/role_graph_update.cpp @@ -181,7 +181,8 @@ namespace { status = AuthorizationManager::getBSONForRole( roleGraph, roleToUpdate, roleDocument.root()); if (status == ErrorCodes::RoleNotFound) { - status = driver.populateDocumentWithQueryFields(queryPattern, roleDocument); + // The query pattern will only contain _id, no other immutable fields are present + status = driver.populateDocumentWithQueryFields(queryPattern, NULL, roleDocument); } if (!status.isOK()) return status; |