Change sec scan candidate query to match parents to the expected version only
This commit is contained in:
parent
aef651a7ad
commit
4e771e667f
1 changed files with 2 additions and 2 deletions
|
@ -430,7 +430,7 @@ def get_secscan_candidates(engine_version, batch_size):
|
|||
ParentImageStorage = ImageStorage.alias()
|
||||
rimages = []
|
||||
|
||||
# Collect the images without parents
|
||||
# Collect the images without parents.
|
||||
candidates = list(Image
|
||||
.select(Image.id)
|
||||
.join(ImageStorage)
|
||||
|
@ -455,7 +455,7 @@ def get_secscan_candidates(engine_version, batch_size):
|
|||
.switch(Image)
|
||||
.join(ImageStorage)
|
||||
.where(Image.security_indexed_engine < engine_version,
|
||||
Parent.security_indexed_engine >= engine_version,
|
||||
Parent.security_indexed_engine == engine_version,
|
||||
ImageStorage.uploading == False)
|
||||
.limit(batch_size*10))
|
||||
|
||||
|
|
Reference in a new issue