Skip to content

Commit

Permalink
FIx default value for processing version
Browse files Browse the repository at this point in the history
  • Loading branch information
vkuznet committed Mar 29, 2022
1 parent 4e33708 commit 96c20a1
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/python/WMComponent/DBS3Buffer/DBSBufferDataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class DBSBufferDataset(WMConnectionBase, dict):
"""

def __init__(self, path, id = -1,
processingVer = None, acquisitionEra = None, validStatus = None,
processingVer = 0, acquisitionEra = None, validStatus = None,
globalTag = None, parent = None, prep_id = None):
"""
Initialize the stored attributes and
Expand Down
2 changes: 1 addition & 1 deletion src/python/WMComponent/DBS3Buffer/DBSBufferFile.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def __init__(self, lfn=None, id=-1, size=None,
self.setdefault("psetHash", None)
self.setdefault("configContent", None)
self.setdefault("datasetPath", None)
self.setdefault("processingVer", None)
self.setdefault("processingVer", 0)
self.setdefault("acquisitionEra", None)
self.setdefault("validStatus", None)
self.setdefault("globalTag", None)
Expand Down
2 changes: 1 addition & 1 deletion src/python/WMComponent/DBS3Buffer/MySQL/NewDataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class NewDataset(DBFormatter):
sql = """INSERT IGNORE INTO dbsbuffer_dataset (path, processing_ver, acquisition_era, valid_status, global_tag, parent, prep_id)
VALUES (:path, :processing_ver, :acquisition_era, :valid_status, :global_tag, :parent, :prep_id)"""

def execute(self, datasetPath, acquisitionEra = None, processingVer = None, validStatus = None,
def execute(self, datasetPath, acquisitionEra = None, processingVer = 0, validStatus = None,
globalTag = None, parent = None, prep_id = None, conn = None, transaction = False):
"""
_execute_
Expand Down
2 changes: 1 addition & 1 deletion src/python/WMComponent/JobAccountant/AccountantWorker.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ def addFileToDBS(self, jobReportFile, task, errorDataset=False):
datasetInfo["dataTier"]))

dbsFile.setValidStatus(validStatus=jobReportFile.get("validStatus", None))
dbsFile.setProcessingVer(ver=jobReportFile.get('processingVer', None))
dbsFile.setProcessingVer(ver=jobReportFile.get('processingVer', 0))
dbsFile.setAcquisitionEra(era=jobReportFile.get('acquisitionEra', None))
dbsFile.setGlobalTag(globalTag=jobReportFile.get('globalTag', None))
# TODO need to find where to get the prep id
Expand Down
2 changes: 1 addition & 1 deletion src/python/WMCore/FwkJobReport/Report.py
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,7 @@ def getOutputFile(self, fileName, outputModule, step):
newFile["merged"] = bool(getattr(fileRef, "merged", False))
newFile["dataset"] = getattr(fileRef, "dataset", {})
newFile["acquisitionEra"] = getattr(fileRef, 'acquisitionEra', None)
newFile["processingVer"] = getattr(fileRef, 'processingVer', None)
newFile["processingVer"] = getattr(fileRef, 'processingVer', 0)
newFile["validStatus"] = getattr(fileRef, 'validStatus', None)
newFile["globalTag"] = getattr(fileRef, 'globalTag', None)
newFile["prep_id"] = getattr(fileRef, 'prep_id', None)
Expand Down

0 comments on commit 96c20a1

Please sign in to comment.