mirror of
https://github.com/resf/distro-tools.git
synced 2024-11-13 00:31:26 +00:00
Use SEVERITY_UNKNOWN instead of SEVERITY_NONE
This commit is contained in:
parent
41488ab903
commit
aae5d1d57c
@ -129,6 +129,10 @@ def v3_advisory_to_v2(
|
||||
|
||||
published_at = advisory.published_at.isoformat("T"
|
||||
).replace("+00:00", "") + "Z"
|
||||
severity = advisory.severity.upper()
|
||||
if severity == "NONE":
|
||||
severity = "UNKNOWN"
|
||||
|
||||
return Advisory_Pydantic_V2(
|
||||
id=advisory.id,
|
||||
publishedAt=published_at,
|
||||
@ -136,7 +140,7 @@ def v3_advisory_to_v2(
|
||||
synopsis=advisory.synopsis,
|
||||
description=advisory.description,
|
||||
type=kind,
|
||||
severity=f"SEVERITY_{advisory.severity.upper()}",
|
||||
severity=f"SEVERITY_{severity}",
|
||||
shortCode=advisory.name[0:2],
|
||||
topic=advisory.topic if advisory.topic else "",
|
||||
solution=None,
|
||||
|
Loading…
Reference in New Issue
Block a user