diff --git a/congress_dashboard/datasources/utils.py b/congress_dashboard/datasources/utils.py index 3a8f7d2..4ab1f9e 100644 --- a/congress_dashboard/datasources/utils.py +++ b/congress_dashboard/datasources/utils.py @@ -98,8 +98,10 @@ def get_policy_violations_data(request): row.set_policy_details(policy) for t in tables: rows = congress.policy_rows_list(request, policy['name'], t) - row.set_value(t, len(rows)) - violations_table.append(row) + if len(rows) > 0: + row.set_value(t, len(rows)) + if row.get('error') or row.get('warning'): + violations_table.append(row) return violations_table diff --git a/congress_dashboard/monitoring/templates/monitoring/index.html b/congress_dashboard/monitoring/templates/monitoring/index.html index 16b404d..149e3f5 100644 --- a/congress_dashboard/monitoring/templates/monitoring/index.html +++ b/congress_dashboard/monitoring/templates/monitoring/index.html @@ -31,16 +31,18 @@ {{ monitoring_table.render }}