Allow disabling auto-rotation for asset origins

This commit is contained in:
Ana Custura 2024-02-19 11:40:51 +00:00
parent fd1f2fe0fc
commit 96d159ae56

View file

@ -138,7 +138,7 @@ def auto_deprecate_proxies() -> None:
for proxy in proxies:
if proxy.origin.destroyed is not None:
proxy.deprecate(reason="origin_destroyed")
if proxy.origin.assets:
if proxy.origin.assets and proxy.origin.auto_rotation:
max_age_cutoff = datetime.datetime.utcnow() - datetime.timedelta(
days=1, seconds=86400 * random.random()) # nosec: B311
if proxy.added < max_age_cutoff: