Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Manager' object has no attribute 'restrict' after adding script count widget in dashboard #14933

Closed
markkuleinio opened this issue Jan 25, 2024 · 3 comments
Assignees
Labels
severity: low Does not significantly disrupt application functionality, or a workaround is available status: blocked Another issue or external requirement is preventing implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@markkuleinio
Copy link
Contributor

Deployment Type

Self-hosted

NetBox Version

v3.7.1

Python Version

3.11

Steps to Reproduce

In the dashboard:

  1. Unlock Dashboard
  2. Add Widget
  3. Widget type = Object Counts
  4. Models = Extras > Scripts
  5. Save

Expected Behavior

There is a widget in the dashboard that shows the number of scripts

Observed Behavior

image

<class 'AttributeError'>
'Manager' object has no attribute 'restrict'

Dashboard reset (/extras/dashboard/reset/) is required to be able to use the home page again.

@markkuleinio markkuleinio added the type: bug A confirmed report of unexpected behavior in the application label Jan 25, 2024
@jeremystretch jeremystretch added status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation severity: low Does not significantly disrupt application functionality, or a workaround is available labels Jan 25, 2024
@llamafilm
Copy link
Contributor

llamafilm commented Feb 1, 2024

I just ran into the same problem. Before I found this page with the fix, I managed to fix it in nbshell like this, after inspecting the User to find the right ID.

>>> dash = Dashboard.objects.get(id=16)
>>> dash.delete_widget(id='a04674a6-6344-46f8-b677-6a9e6443277a')
>>> dash.full_clean()
>>> dash.save()

@markkuleinio markkuleinio changed the title 'Manager' object has no attribute 'restrict' when adding script count widget in dashboard 'Manager' object has no attribute 'restrict' after adding script count widget in dashboard Feb 15, 2024
@arthanson arthanson added the status: blocked Another issue or external requirement is preventing implementation label Feb 20, 2024
@arthanson
Copy link
Collaborator

arthanson commented Feb 20, 2024

blocked by #14438

@arthanson arthanson self-assigned this Feb 20, 2024
@arthanson arthanson removed the status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation label Feb 20, 2024
@arthanson
Copy link
Collaborator

This will be fixed in NB 4.0 via #14438

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
severity: low Does not significantly disrupt application functionality, or a workaround is available status: blocked Another issue or external requirement is preventing implementation type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

No branches or pull requests

4 participants