Skip to content

Commit

Permalink
fix for partial match
Browse files Browse the repository at this point in the history
  • Loading branch information
zgeorg committed Nov 9, 2024
1 parent b43481c commit dac95db
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/routers/product_alerts.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,12 @@ def end_of_life_by_hardware(
seen_notice_ids = set()
for eol in all_eols:
bulletin_id = eol.get("url")
# Check if product_id partially matches any entry in affectedProducts
if (
product_id in eol.get("affectedProducts", [])
and bulletin_id not in seen_notice_ids
any(
product_id
in product for product in eol.get("affectedProducts", []))
and bulletin_id not in seen_notice_ids
):
filtered_eols.append(eol)
seen_notice_ids.add(bulletin_id)
Expand Down

0 comments on commit dac95db

Please sign in to comment.