diff --git a/data/model/tag.py b/data/model/tag.py index 98d0579fa..8f75b1650 100644 --- a/data/model/tag.py +++ b/data/model/tag.py @@ -20,11 +20,10 @@ def get_max_id_for_sec_scan(): def get_min_id_for_sec_scan(version): """ Gets the minimum id for a security scanning """ - return (RepositoryTag - .select(fn.Min(RepositoryTag.id)) - .join(Image) - .where(Image.security_indexed_engine < version) - .scalar()) + return _tag_alive(RepositoryTag + .select(fn.Min(RepositoryTag.id)) + .join(Image) + .where(Image.security_indexed_engine < version)).scalar() def get_tag_pk_field():