Adding a Script Widget Causes Server Error #9197

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

Originally created by @mtbutler07 on GitHub (Feb 5, 2024).

Deployment Type

NetBox Cloud

NetBox Version

v3.7.1

Python Version

3.11

Steps to Reproduce

  1. Click "Unlock Dashboard"
  2. Click "+ Add Widget"
  3. Set Widget Type to "Object Counts"
  4. Set Models to "Extras > Scripts"
  5. Click "Save"
Screenshot 2024-02-05 at 12 27 20 PM Screenshot 2024-02-05 at 12 28 40 PM

To resolve this, I was able to reset the dashboard by going to https://<netbox>/extras/dashboard/reset/ as others have mentioned in this discussion https://github.com/netbox-community/netbox/discussions/12520

Expected Behavior

A new widget to be added showing some a counter representing the number of times a script has been run.

Observed Behavior

<class 'AttributeError'>
'Manager' object has no attribute 'restrict'
Originally created by @mtbutler07 on GitHub (Feb 5, 2024). ### Deployment Type NetBox Cloud ### NetBox Version v3.7.1 ### Python Version 3.11 ### Steps to Reproduce 1. Click "Unlock Dashboard" 2. Click "+ Add Widget" 3. Set **Widget Type** to "Object Counts" 4. Set **Models** to "Extras > Scripts" 5. Click "Save" <img width="452" alt="Screenshot 2024-02-05 at 12 27 20 PM" src="https://github.com/netbox-community/netbox/assets/33135168/25c41297-cbbe-413e-8148-eb5d64ccd4b4"> <img width="740" alt="Screenshot 2024-02-05 at 12 28 40 PM" src="https://github.com/netbox-community/netbox/assets/33135168/49dce240-d90f-42f6-99b0-f1e8b828311b"> ____ To resolve this, I was able to reset the dashboard by going to `https://<netbox>/extras/dashboard/reset/` as others have mentioned in this discussion https://github.com/netbox-community/netbox/discussions/12520 ### Expected Behavior A new widget to be added showing some a counter representing the number of times a script has been run. ### Observed Behavior ```text <class 'AttributeError'> 'Manager' object has no attribute 'restrict' ```
adam added the type: bugstatus: duplicate labels 2025-12-29 20:46:50 +01:00
adam closed this issue 2025-12-29 20:46:50 +01:00
Author
Owner

@mtbutler07 commented on GitHub (Feb 5, 2024):

Duplicate of https://github.com/netbox-community/netbox/issues/14933

@mtbutler07 commented on GitHub (Feb 5, 2024): Duplicate of https://github.com/netbox-community/netbox/issues/14933
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#9197