Security scanner ordered tuplize bug fix

If only the old list is present, we still need to tuplize the entries.

Fixes https://sentry.io/coreos/backend-production/issues/207196561/
This commit is contained in:
Joseph Schorr 2017-01-24 13:16:44 -05:00
parent 82898d05f3
commit 7c1bb886db

View file

@ -112,7 +112,9 @@ class SecurityNotificationHandler(object):
# Check for ordered data. If found, we use the indexed tracker, which is faster and
# more memory efficient.
is_indexed = False
if 'OrderedLayersIntroducingVulnerability' in new_data:
if ('OrderedLayersIntroducingVulnerability' in new_data or
'OrderedLayersIntroducingVulnerability' in old_data):
def tuplize(stream):
return [(entry['LayerName'], entry['Index']) for entry in stream]