data.model.tag: find min *alive* tag

This commit is contained in:
Jimmy Zelinskie 2017-03-10 13:15:35 -05:00
parent 6d6be63ca6
commit 53eb579459

View file

@ -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():