Fix check used for addon auto update (#4933)

* Fix check used for addon auto update

* Move timedelta to other side

Co-authored-by: Stefan Agner <stefan@agner.ch>

---------

Co-authored-by: Stefan Agner <stefan@agner.ch>
This commit is contained in:
Mike Degatano 2024-02-29 11:22:21 -05:00 committed by GitHub
parent 9d4848ee77
commit 98779a48b1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -106,7 +106,7 @@ class Tasks(CoreSysAttributes):
addon.latest_version,
)
# Delay auto-updates for a day in case of issues
if utcnow() + timedelta(days=1) > addon.latest_version_timestamp:
if utcnow() < addon.latest_version_timestamp + timedelta(days=1):
continue
if not addon.test_update_schema():
_LOGGER.warning(