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

Cannot delete a user that has bookmarks #14851

Closed
NetTech2001 opened this issue Jan 18, 2024 · 1 comment · Fixed by #14867
Closed

Cannot delete a user that has bookmarks #14851

NetTech2001 opened this issue Jan 18, 2024 · 1 comment · Fixed by #14867
Assignees
Labels
severity: low Does not significantly disrupt application functionality, or a workaround is available status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@NetTech2001
Copy link

Deployment Type

Self-hosted

NetBox Version

v3.7.0

Python Version

3.8

Steps to Reproduce

Click Admin
Click Users
Attempt to delete a use who has a bookmark defined on their dashboard.

Expected Behavior

Deleting an account should just delete the associated bookmarks, maybe with a warning.

Observed Behavior

Get error that account cannot be deleted because there is a dependancy. The dependancy will be the device they have bookmarked.
Deleting the bookmark allows the account to be deleted.

@NetTech2001 NetTech2001 added the type: bug A confirmed report of unexpected behavior in the application label Jan 18, 2024
@jeffgdotorg jeffgdotorg changed the title Cannot delete admin with bookmarks Cannot delete a user that has bookmarks Jan 19, 2024
@jeffgdotorg
Copy link
Contributor

We should change the constraint in this relationship to cascade rather than protect.

@jeffgdotorg jeffgdotorg added the status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation label Jan 19, 2024
@abhi1693 abhi1693 self-assigned this Jan 19, 2024
@abhi1693 abhi1693 added status: accepted This issue has been accepted for implementation severity: low Does not significantly disrupt application functionality, or a workaround is available and removed status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation labels Jan 19, 2024
jeremystretch added a commit that referenced this issue Jan 19, 2024
* fixes user delete when they have a bookmark #14851

* Include migration for user field

---------

Co-authored-by: Jeremy Stretch <[email protected]>
jeremystretch added a commit that referenced this issue Jan 19, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 19, 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: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants