diff --git a/Modules/Common/src/CcdbInspectorTask.cxx b/Modules/Common/src/CcdbInspectorTask.cxx index c5280c74e0..a67174205f 100644 --- a/Modules/Common/src/CcdbInspectorTask.cxx +++ b/Modules/Common/src/CcdbInspectorTask.cxx @@ -211,7 +211,9 @@ CcdbInspectorTask::ObjectStatus CcdbInspectorTask::inspectObject(CcdbInspectorTa // get timestamps and run numberof the last available object auto fullObjectPath = (mDatabaseType == "qcdb" ? trigger.activity.mProvenance + "/" : "") + path; - auto metadata = mDatabaseType == "qcdb" ? activity_helpers::asDatabaseMetadata(trigger.activity, false) : std::map(); + // metadata for CCDB queries, only specifying the run number + std::map metadataCcdb{ { "runNumber", std::to_string(trigger.activity.mId) } }; + auto metadata = mDatabaseType == "qcdb" ? activity_helpers::asDatabaseMetadata(trigger.activity, false) : metadataCcdb; auto timestamps = getObjectInfo(path, metadata); auto creationTime = std::get<2>(timestamps); auto runNumber = std::get<3>(timestamps);