diff --git a/Database/IOVDbSvc/src/IOVDbParser.cxx b/Database/IOVDbSvc/src/IOVDbParser.cxx index 49da282b150198432af4cdbb70c43ee2c7ba7ccb..19a52fc054d04df18d6cabdf6e73c1af40bc0896 100644 --- a/Database/IOVDbSvc/src/IOVDbParser.cxx +++ b/Database/IOVDbSvc/src/IOVDbParser.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // IOVDbParser.cxx @@ -286,8 +286,10 @@ IOVDbParser::iovOverrideValue() const{ unsigned long long value{}; if (not overridesIov()) return value; auto pTsPair = m_keys.find("forceTimestamp"); - value = IOVDbNamespace::iovFromTimeString(pTsPair->second); - if (pTsPair==m_keys.end()){ + if (pTsPair!=m_keys.end()){ + value = IOVDbNamespace::iovFromTimeString(pTsPair->second); + } + else { auto pRunPair = m_keys.find("forceRunNumber"); auto pLumiPair = m_keys.find("forceLumiblockNumber"); const auto & runString = (pRunPair!=m_keys.end()) ? pRunPair->second : "";