mirror of
https://github.com/resf/distro-tools.git
synced 2024-11-25 06:31:26 +00:00
Further fix rpms in compat API
This commit is contained in:
parent
dec33c5de6
commit
77cab63d2f
@ -99,7 +99,7 @@ class Advisory_Pydantic_V2(BaseModel):
|
||||
cves: list[Advisory_Pydantic_V2_CVE]
|
||||
references: list[str]
|
||||
publishedAt: str
|
||||
rpms: dict[str, list[str]]
|
||||
rpms: dict[str, list[Advisory_Pydantic_V2_RPM]]
|
||||
rebootSuggested: bool
|
||||
buildReferences: list[str]
|
||||
|
||||
|
@ -133,8 +133,11 @@ def v3_advisory_to_v2(
|
||||
rpms[name].append(pkg.nevra)
|
||||
|
||||
rpms_res = {}
|
||||
for product, rpms in rpms.items():
|
||||
rpms_res[product] = [Advisory_Pydantic_V2_RPM(nevra=x) for x in rpms]
|
||||
if include_rpms:
|
||||
for product, rpms in rpms.items():
|
||||
rpms_res[product] = [
|
||||
Advisory_Pydantic_V2_RPM(nevra=x) for x in rpms
|
||||
]
|
||||
|
||||
published_at = advisory.published_at.isoformat("T"
|
||||
).replace("+00:00", "") + "Z"
|
||||
@ -153,7 +156,7 @@ def v3_advisory_to_v2(
|
||||
shortCode=advisory.name[0:2],
|
||||
topic=advisory.topic if advisory.topic else "",
|
||||
solution=None,
|
||||
rpms=rpms,
|
||||
rpms=rpms_res,
|
||||
affectedProducts=affected_products,
|
||||
references=[],
|
||||
rebootSuggested=False,
|
||||
|
Loading…
Reference in New Issue
Block a user