cleaned migration code
This commit is contained in:
parent
65a495dc36
commit
2171460b9e
1 changed files with 4 additions and 4 deletions
|
|
@ -823,7 +823,7 @@ class ComponentObjects:
|
|||
mimeType=file["mimeType"],
|
||||
fileHash=file["fileHash"],
|
||||
fileSize=file["fileSize"],
|
||||
sysCreatedAt=file.get("sysCreatedAt") or file.get("creationDate"),
|
||||
sysCreatedAt=file.get("sysCreatedAt"),
|
||||
)
|
||||
|
||||
def getMimeType(self, fileName: str) -> str:
|
||||
|
|
@ -928,7 +928,7 @@ class ComponentObjects:
|
|||
fileItems = []
|
||||
for file in files:
|
||||
try:
|
||||
sysCreatedAt = file.get("sysCreatedAt") or file.get("creationDate")
|
||||
sysCreatedAt = file.get("sysCreatedAt")
|
||||
if sysCreatedAt is None or not isinstance(sysCreatedAt, (int, float)) or sysCreatedAt <= 0:
|
||||
file["sysCreatedAt"] = getUtcTimestamp()
|
||||
else:
|
||||
|
|
@ -979,8 +979,8 @@ class ComponentObjects:
|
|||
|
||||
file = filteredFiles[0]
|
||||
try:
|
||||
sysCreatedAt = file.get("sysCreatedAt") or file.get("creationDate")
|
||||
if not sysCreatedAt:
|
||||
sysCreatedAt = file.get("sysCreatedAt")
|
||||
if sysCreatedAt is None or not isinstance(sysCreatedAt, (int, float)) or sysCreatedAt <= 0:
|
||||
sysCreatedAt = getUtcTimestamp()
|
||||
|
||||
return FileItem(
|
||||
|
|
|
|||
Loading…
Reference in a new issue