Uploading report without test method yields "Server Error" #8565

Closed
opened 2025-12-29 20:38:14 +01:00 by adam · 1 comment
Owner

Originally created by @JCWasmx86 on GitHub (Sep 3, 2023).

Originally assigned to: @JCWasmx86 on GitHub.

NetBox version

v3.6.0 (But reproducible in 3.6.1-dev, too)

Python version

3.11

Steps to Reproduce

1.Create a.py:

from extras.reports import Report

class DeviceConnectionsReport(Report):
    description = "Validate the minimum physical connections for each device"
    pass

(Note, the class doesn't have a test method)

2.Upload it as report

Expected Behavior

I expected it to either get an error, that there are no test methods in it, and the ability to delete it without using the CLI.

Observed Behavior

Reality:

<class 'Exception'>

A report must contain at least one test method.

Python version: 3.11.4
NetBox version: 3.6.1-dev
Plugins: None installed

image

Screenshot from develop branch, but reproducible with stable, too

Originally created by @JCWasmx86 on GitHub (Sep 3, 2023). Originally assigned to: @JCWasmx86 on GitHub. ### NetBox version v3.6.0 (But reproducible in 3.6.1-dev, too) ### Python version 3.11 ### Steps to Reproduce 1.Create `a.py`: ```py from extras.reports import Report class DeviceConnectionsReport(Report): description = "Validate the minimum physical connections for each device" pass ``` (Note, the class doesn't have a test method) 2.Upload it as report ### Expected Behavior I expected it to either get an error, that there are no test methods in it, and the ability to delete it without using the CLI. ### Observed Behavior Reality: ``` <class 'Exception'> A report must contain at least one test method. Python version: 3.11.4 NetBox version: 3.6.1-dev Plugins: None installed ``` ![image](https://github.com/netbox-community/netbox/assets/63594136/75bc3936-9ed5-4335-98cb-761829f56fc4) Screenshot from develop branch, but reproducible with stable, too
adam added the type: bugstatus: acceptedseverity: low labels 2025-12-29 20:38:14 +01:00
adam closed this issue 2025-12-29 20:38:14 +01:00
Author
Owner

@JCWasmx86 commented on GitHub (Sep 3, 2023):

I will work on this issue, if it is accepted

@JCWasmx86 commented on GitHub (Sep 3, 2023): I will work on this issue, if it is accepted
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#8565