mirror of
https://github.com/resf/distro-tools.git
synced 2024-11-22 05:01:26 +00:00
Fix "filters.severity" for compat API
This commit is contained in:
parent
b66cef60e9
commit
f8432a7b82
@ -196,6 +196,17 @@ async def fetch_advisories_compat(
|
||||
elif q_kind == "TYPE_SECURITY":
|
||||
q_kind = "Security"
|
||||
|
||||
q_severity = severity
|
||||
if q_severity:
|
||||
if q_severity == "SEVERITY_LOW":
|
||||
q_severity = "Low"
|
||||
elif q_severity == "SEVERITY_MEDIUM":
|
||||
q_severity = "Moderate"
|
||||
elif q_severity == "SEVERITY_IMPORTANT":
|
||||
q_severity = "Important"
|
||||
elif q_severity == "SEVERITY_CRITICAL":
|
||||
q_severity = "Critical"
|
||||
|
||||
a = """
|
||||
with vars (search, size, page_offset, product, before, after, cve, synopsis, severity, kind) as (
|
||||
values ($1 :: text, $2 :: bigint, $3 :: bigint, $4 :: text, $5 :: timestamp, $6 :: timestamp, $7 :: text, $8 :: text, $9 :: text, $10 :: text)
|
||||
@ -250,7 +261,7 @@ async def fetch_advisories_compat(
|
||||
after,
|
||||
cve,
|
||||
synopsis,
|
||||
severity,
|
||||
q_severity,
|
||||
q_kind,
|
||||
]
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user