Skip to content

Commit

Permalink
fix (TS): pre-commit reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
arrabito committed Aug 22, 2024
1 parent 79c631b commit 1f65b29
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/DIRAC/TransformationSystem/DB/TransformationDB.py
Original file line number Diff line number Diff line change
Expand Up @@ -1631,10 +1631,16 @@ def addFile(self, fileDicts, force=False, connection=False):
for fileDict in res["Value"]:
fileIDs.append(fileDict["FileID"])
if fileDict["Status"] == TransformationStatus.DELETED:
res = self.__setTransformationFileStatus(list(fileIDs), TransformationStatus.UNUSED, connection=connection)
res = self.__setTransformationFileStatus(
list(fileIDs), TransformationStatus.UNUSED, connection=connection
)
if not res["OK"]:
return res
if not (res := self.__setDataFileStatus(list(fileIDs), TransformationStatus.NEW, connection=connection)["OK"]:
if not (
res := self.__setDataFileStatus(
list(fileIDs), TransformationStatus.NEW, connection=connection
)["OK"]
):
return res

res = self.addFilesToTransformation(transID, lfns)
Expand Down Expand Up @@ -1777,14 +1783,15 @@ def setMetadata(self, path, usermetadatadict, connection=False):
for fileDict in res["Value"]:
fileIDs.append(fileDict["FileID"])
if fileDict["Status"] == TransformationStatus.DELETED:
res = self.__setTransformationFileStatus(list(fileIDs), TransformationStatus.UNUSED, connection=connection)
res = self.__setTransformationFileStatus(
list(fileIDs), TransformationStatus.UNUSED, connection=connection
)
if not res["OK"]:
return res
res = self.__setDataFileStatus(list(fileIDs), TransformationStatus.NEW, connection=connection)
if not res["OK"]:
return res


res = self.addFilesToTransformation(transID, lfns)
if not res["OK"]:
gLogger.error("Failed to add files to transformation", f"{transID} {res['Message']}")
Expand Down

0 comments on commit 1f65b29

Please sign in to comment.