Commit 4f79745e authored by Elger Jonker's avatar Elger Jonker

Fix #136 skipped URL ratings if there where no endpoint ratings


Former-commit-id: 720eacd3
parent bb9aea3a
......@@ -761,11 +761,6 @@ def rate_timeline(timeline, url: Url):
previous_endpoints += relevant_endpoints
# prevent empty ratings cluttering the database and skewing the stats.
# todo: only do this if there never was a urlrating before this.
if not endpoint_reports and not url_was_once_rated:
continue
# Add url generic scans, using the same logic as endpoints.
# - It reuses ratings from the previous moment, but if there are new ratings for a specific scan type only the
# rating for this specific scan type is overwritten.
......@@ -821,6 +816,11 @@ def rate_timeline(timeline, url: Url):
total_low += calculation["low"]
url_issues_low += calculation["low"]
# prevent empty ratings cluttering the database and skewing the stats.
# todo: only do this if there never was a urlrating before this.
if not endpoint_reports and not url_was_once_rated and not url_calculations:
continue
total_url_issues = url_issues_high + url_issues_medium + url_issues_low
explained_total_url_issues = explained_url_issues_high + explained_url_issues_medium + explained_url_issues_low
total_endpoint_issues = endpoint_issues_high + endpoint_issues_medium + endpoint_issues_low
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment