-
Notifications
You must be signed in to change notification settings - Fork 228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add pipeline for adding advisory ID and tests #1833
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Tushar Goel <[email protected]>
Signed-off-by: Tushar Goel <[email protected]>
Signed-off-by: Tushar Goel <[email protected]>
importer_name = advisory.created_by | ||
aliases = Alias.objects.filter(advisories=advisory).values_list("alias", flat=True) | ||
advisory_id = IMPORTERS_REGISTRY[importer_name].get_advisory_id(aliases=aliases) | ||
if advisory_id is None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use if not advisory_id
instead of
if advisory_id is None: | |
if not advisory_id: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
log this thing
advisory_id = IMPORTERS_REGISTRY[importer_name].get_advisory_id(aliases=aliases) | ||
if advisory_id is None: | ||
continue | ||
advisory.advisory_id = advisory_id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Disassociate the advisory_id as an alias from the advisory
Reference: #1796