summaryrefslogtreecommitdiff
path: root/src/mongo/shell/shardingtest.js
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2022-04-15 09:45:00 +0200
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-04-15 08:14:04 +0000
commit67fa5f3ae853a8513e3aeb44b3a86156f3d51a4b (patch)
treeba519f027aace67a464d464bd38fc40367b34bd9 /src/mongo/shell/shardingtest.js
parent9b6755d018fa749405cc2a603c1c5d935a20a742 (diff)
downloadmongo-67fa5f3ae853a8513e3aeb44b3a86156f3d51a4b.tar.gz
SERVER-64526 Fix printCollectionInfo for missing collections
Diffstat (limited to 'src/mongo/shell/shardingtest.js')
-rw-r--r--src/mongo/shell/shardingtest.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mongo/shell/shardingtest.js b/src/mongo/shell/shardingtest.js
index 4bd31c319fd..63dd41857c2 100644
--- a/src/mongo/shell/shardingtest.js
+++ b/src/mongo/shell/shardingtest.js
@@ -472,6 +472,9 @@ var ShardingTest = function(params) {
let query = {};
let sorting_criteria = {};
const collection = this.config.collections.findOne({_id: ns});
+ if (!collection) {
+ return "";
+ }
if (collection.timestamp) {
const collectionUUID = collection.uuid;