diff --git a/app/models/mirrors.py b/app/models/mirrors.py index 10fcdf3..563de53 100644 --- a/app/models/mirrors.py +++ b/app/models/mirrors.py @@ -85,7 +85,8 @@ class Origin(AbstractConfiguration): .filter( Origin.id == self.id, Deprecation.resource_type == 'Proxy', - Deprecation.deprecated_at >= datetime.utcnow() - timedelta(hours=168) + Deprecation.deprecated_at >= datetime.utcnow() - timedelta(hours=168), + Deprecation.reason != "destroyed" ) .distinct(Proxy.id) .all() @@ -130,7 +131,8 @@ class Country(AbstractConfiguration): .filter( Country.id == self.id, Deprecation.resource_type == 'Proxy', - Deprecation.deprecated_at >= datetime.utcnow() - timedelta(hours=168) + Deprecation.deprecated_at >= datetime.utcnow() - timedelta(hours=168), + Deprecation.reason != "destroyed" ) .distinct(Proxy.id) .all()