Skip to content

Commit b730fe4

Browse files
committed
adjust rules
Signed-off-by: tdruez <tdruez@aboutcode.org>
1 parent c333882 commit b730fe4

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

policy/rules.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,17 +70,15 @@ class UsagePolicyErrorRule(PackageBaseRule):
7070
rule_type = "usage_policy_error"
7171
label = "Usage Policy Error"
7272
severity = "error"
73-
description = (
74-
"Detects packages assigned a usage policy with a compliance alert level of 'error'."
75-
)
73+
description = "Detects packages assigned a usage policy with a compliance alert level of error."
7674
package_filter = {"usage_policy__compliance_alert": "error"}
7775

7876

7977
class UsagePolicyWarningRule(PackageBaseRule):
8078
rule_type = "usage_policy_warning"
8179
label = "Usage Policy Warning"
8280
description = (
83-
"Detects packages assigned a usage policy with a compliance alert level of 'warning'."
81+
"Detects packages assigned a usage policy with a compliance alert level of warning."
8482
)
8583
package_filter = {"usage_policy__compliance_alert": "warning"}
8684

@@ -91,7 +89,7 @@ class LicensePolicyErrorRule(PackageBaseRule):
9189
severity = "error"
9290
description = (
9391
"Detects packages whose licenses are assigned a usage policy"
94-
" with a compliance alert level of 'error'."
92+
" with a compliance alert level of error."
9593
)
9694
package_filter = {"licenses__usage_policy__compliance_alert": "error"}
9795

@@ -101,7 +99,7 @@ class LicensePolicyWarningRule(PackageBaseRule):
10199
label = "License Policy Warning"
102100
description = (
103101
"Detects packages whose licenses are assigned a usage policy"
104-
" with a compliance alert level of 'warning'."
102+
" with a compliance alert level of warning."
105103
)
106104
package_filter = {"licenses__usage_policy__compliance_alert": "warning"}
107105

product_portfolio/templates/product_portfolio/compliance/compliance_panels.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ <h5 class="modal-title fs-6 fw-medium" id="policy-rules-modal-label">{% trans "P
9595
</td>
9696
<td class="text-body-secondary small">{{ violation.rule_description }}</td>
9797
<td class="text-end">
98-
<a href="{{ product_url }}?inventory-policy_rule={{ violation.rule_type }}#inventory"
98+
<a href="{{ product_url }}?inventory-object_type=package&amp;inventory-policy_rule={{ violation.rule_type }}#inventory"
9999
class="text-decoration-none">
100100
{{ violation.violation_count }}
101101
</a>

0 commit comments

Comments
 (0)