mirror of
https://github.com/outbackdingo/OpCore-Simplify.git
synced 2026-08-25 14:53:06 +00:00
Ensure the value is always valid
This commit is contained in:
@@ -262,7 +262,9 @@ class gatheringFiles:
|
|||||||
"last_updated": "2024-07-25T12:00:00"
|
"last_updated": "2024-07-25T12:00:00"
|
||||||
}
|
}
|
||||||
|
|
||||||
last_updated = datetime.fromisoformat(download_history["last_updated"] or "2024-07-25T12:00:00")
|
if not download_history.get("versions"):
|
||||||
|
download_history["versions"] = []
|
||||||
|
last_updated = datetime.fromisoformat(download_history.get("last_updated", "2024-07-25T12:00:00"))
|
||||||
|
|
||||||
current_time = datetime.now()
|
current_time = datetime.now()
|
||||||
if current_time - last_updated < timedelta(minutes=10):
|
if current_time - last_updated < timedelta(minutes=10):
|
||||||
|
|||||||
Reference in New Issue
Block a user