Diff comments:
> diff --git a/lib/lp/bugs/scripts/soss/sossimport.py
> b/lib/lp/bugs/scripts/soss/sossimport.py
> index 2bb7c17..f4b1254 100644
> --- a/lib/lp/bugs/scripts/soss/sossimport.py
> +++ b/lib/lp/bugs/scripts/soss/sossimport.py
> @@ -288,6 +294,14 @@ class SOSSImporter(SVTImporter):
> vulnerability.date_coordinated_release = None
> vulnerability.cvss = self._prepare_cvss_data(soss_record)
>
> + if soss_record.extra_attrs:
You can add a test that checks this. If the extra_attrs was set and the new
data we import is None, we should clean the metadata.
> + if isinstance(dict, vulnerability.metadata):
> + vulnerability.metadata["extra_attrs"] =
> soss_record.extra_attrs
> + else:
> + vulnerability.metadata = {
> + "extra_attrs": soss_record.extra_attrs
> + }
> +
> logger.info(
> "[SOSSImporter] Updated Vulnerability with ID: "
> f"{vulnerability.id} for {vulnerability.distribution.name}",
--
https://code.launchpad.net/~ilkeremrekoc/launchpad/+git/launchpad/+merge/493278
Your team Launchpad code reviewers is requested to review the proposed merge of
~ilkeremrekoc/launchpad:add-extra-attrs into launchpad:master.
_______________________________________________
Mailing list: https://launchpad.net/~launchpad-reviewers
Post to : [email protected]
Unsubscribe : https://launchpad.net/~launchpad-reviewers
More help : https://help.launchpad.net/ListHelp