mirror of
https://github.com/resf/distro-tools.git
synced 2024-11-21 20:51:27 +00:00
Respect fetch_related for fetch_advisories
This commit is contained in:
parent
2763793211
commit
19d514830a
@ -84,16 +84,17 @@ async def fetch_advisories(
|
|||||||
count = results[1][0]["total"]
|
count = results[1][0]["total"]
|
||||||
|
|
||||||
advisories = [Advisory(**x) for x in results[1]]
|
advisories = [Advisory(**x) for x in results[1]]
|
||||||
for advisory in advisories:
|
if fetch_related:
|
||||||
await advisory.fetch_related(
|
for advisory in advisories:
|
||||||
"packages",
|
await advisory.fetch_related(
|
||||||
"cves",
|
"packages",
|
||||||
"fixes",
|
"cves",
|
||||||
"affected_products",
|
"fixes",
|
||||||
"packages",
|
"affected_products",
|
||||||
"packages__supported_product",
|
"packages",
|
||||||
"packages__supported_products_rh_mirror",
|
"packages__supported_product",
|
||||||
)
|
"packages__supported_products_rh_mirror",
|
||||||
|
)
|
||||||
return (
|
return (
|
||||||
count,
|
count,
|
||||||
advisories,
|
advisories,
|
||||||
|
Loading…
Reference in New Issue
Block a user