Skip to content

Commit

Permalink
Trivy discovery total records count display error resolution (#7)
Browse files Browse the repository at this point in the history
* Corrected Trivy-scans URL for pagination to work

* Corrected variable for total records count
  • Loading branch information
Sandhya1874 authored Mar 11, 2025
1 parent 2ee8223 commit df7d89f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions trivy_discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ def fetch_sc_data(API_ENDPOINT):
sc_result_data.extend(r.json()["data"])
except Exception as e:
raise Exception(f"Received non-200 response from Service Catalogue {API_ENDPOINT}{page}: {r.status_code}")

log.info(f"Total records in {API_ENDPOINT} {r.json()["meta"]["pagination"]["total"]}")
total_records = j_meta['total']
log.info(f"Total records in {API_ENDPOINT} : {total_records}")
log.info(f"Total records fetched from {API_ENDPOINT}: {len(sc_result_data)}")

return sc_result_data
Expand Down

0 comments on commit df7d89f

Please sign in to comment.