Skip to content
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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

TG1999
Copy link
Contributor

@TG1999 TG1999 commented Mar 28, 2025

Reference: #1796

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:
Copy link
Contributor Author

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

Suggested change
if advisory_id is None:
if not advisory_id:

Copy link
Contributor Author

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
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant