Skip to content

Commit 9989b7b

Browse files
authored
Merge branch 'develop' into feature/gp_v10python
2 parents ed8ac9e + 7145a2d commit 9989b7b

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

sbncode/Metadata/FileCatalogMetadataSBN_service.cc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,13 @@ void util::FileCatalogMetadataSBN::postBeginJob()
6161

6262
// Add metadata.
6363

64-
mds->addMetadata("fcl.name", fFCLName);
65-
mds->addMetadata(fExperiment + "_project.name", fProjectName);
66-
mds->addMetadata(fExperiment + "_project.stage", fProjectStage);
67-
mds->addMetadata(fExperiment + "_project.version", fProjectVersion);
68-
mds->addMetadata(fExperiment + "_project.software", fProjectSoftware);
69-
mds->addMetadata("production.name", fProductionName);
70-
mds->addMetadata("production.type", fProductionType);
64+
if (!fFCLName.empty()) mds->addMetadata("fcl.name", fFCLName);
65+
if (!fProjectName.empty()) mds->addMetadata(fExperiment + "_project.name", fProjectName);
66+
if (!fProjectStage.empty()) mds->addMetadata(fExperiment + "_project.stage", fProjectStage);
67+
if (!fProjectVersion.empty()) mds->addMetadata(fExperiment + "_project.version", fProjectVersion);
68+
if (!fProjectSoftware.empty()) mds->addMetadata(fExperiment + "_project.software", fProjectSoftware);
69+
if (!fProductionName.empty()) mds->addMetadata("production.name", fProductionName);
70+
if (!fProductionType.empty()) mds->addMetadata("production.type", fProductionType);
7171
std::ostringstream ostr;
7272
if(fMerge >= 0) {
7373
if(fMerge > 0)

0 commit comments

Comments
 (0)