mirror of
https://github.com/resf/distro-tools.git
synced 2024-12-22 10:58:28 +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"
|
published_at = advisory.published_at.isoformat("T"
|
||||||
).replace("+00:00", "") + "Z"
|
).replace("+00:00", "") + "Z"
|
||||||
|
severity = advisory.severity.upper()
|
||||||
|
if severity == "NONE":
|
||||||
|
severity = "UNKNOWN"
|
||||||
|
|
||||||
return Advisory_Pydantic_V2(
|
return Advisory_Pydantic_V2(
|
||||||
id=advisory.id,
|
id=advisory.id,
|
||||||
publishedAt=published_at,
|
publishedAt=published_at,
|
||||||
@ -136,7 +140,7 @@ def v3_advisory_to_v2(
|
|||||||
synopsis=advisory.synopsis,
|
synopsis=advisory.synopsis,
|
||||||
description=advisory.description,
|
description=advisory.description,
|
||||||
type=kind,
|
type=kind,
|
||||||
severity=f"SEVERITY_{advisory.severity.upper()}",
|
severity=f"SEVERITY_{severity}",
|
||||||
shortCode=advisory.name[0:2],
|
shortCode=advisory.name[0:2],
|
||||||
topic=advisory.topic if advisory.topic else "",
|
topic=advisory.topic if advisory.topic else "",
|
||||||
solution=None,
|
solution=None,
|
||||||
|
Loading…
Reference in New Issue
Block a user