From e67624f0427f6a2c12a3abb06fc57836da8d6554 Mon Sep 17 00:00:00 2001 From: JCWasmx86 Date: Tue, 26 Sep 2023 16:41:09 +0200 Subject: [PATCH] Fixes #13666: Fix behavior for reports without test methods (#13667) --- netbox/extras/reports.py | 2 -- netbox/templates/extras/report.html | 6 +++++- netbox/templates/extras/report_list.html | 10 ++++++++-- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/netbox/extras/reports.py b/netbox/extras/reports.py index 6af81a9d9..284f69d77 100644 --- a/netbox/extras/reports.py +++ b/netbox/extras/reports.py @@ -106,8 +106,6 @@ class Report(object): 'failure': 0, 'log': [], } - if not test_methods: - raise Exception("A report must contain at least one test method.") self.test_methods = test_methods @classproperty diff --git a/netbox/templates/extras/report.html b/netbox/templates/extras/report.html index 07d6fcfd5..717c24eab 100644 --- a/netbox/templates/extras/report.html +++ b/netbox/templates/extras/report.html @@ -12,7 +12,11 @@ {% csrf_token %} {% render_form form %}
-