diff --git a/src/DIRAC/WorkloadManagementSystem/DB/JobDB.py b/src/DIRAC/WorkloadManagementSystem/DB/JobDB.py index 540358b4ce2..e4507a230be 100755 --- a/src/DIRAC/WorkloadManagementSystem/DB/JobDB.py +++ b/src/DIRAC/WorkloadManagementSystem/DB/JobDB.py @@ -448,6 +448,9 @@ def setJobAttribute(self, jobID, attrName, attrValue, update=False, myDate=None, :return: S_OK/S_ERROR """ + if not jobID: + return S_OK() + if attrName not in self.jobAttributeNames: return S_ERROR(EWMSJMAN, "Request to set non-existing job attribute") @@ -505,6 +508,9 @@ def setJobAttributes(self, jobID, attrNames, attrValues, update=False, myDate=No :return: S_OK/S_ERROR """ + if not jobID: + return S_OK() + jobIDList = jobID if not isinstance(jobID, (list, tuple)): jobIDList = [jobID]