From 4e771e667fe251654d171366457c8a9a3f6f1207 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Tue, 9 Feb 2016 22:23:48 +0200 Subject: [PATCH] Change sec scan candidate query to match parents to the expected version only --- data/model/image.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/model/image.py b/data/model/image.py index ecb3b75a3..f6330eacf 100644 --- a/data/model/image.py +++ b/data/model/image.py @@ -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))