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

Adding ID to the Diff tab in a branch results in an exception and leaves the Diff tab in an unrecoverable state #138

Closed
mrmrcoleman opened this issue Sep 18, 2024 · 2 comments · Fixed by #147
Assignees
Labels
type: bug A confirmed report of unexpected behavior in the application

Comments

@mrmrcoleman
Copy link

Plugin Version

0.5.0

NetBox Version

4.1.1

Python Version

Python 3.12.6

Steps to Reproduce

  • Create a branch
  • Add a site to the branch
  • Go to the branch Diff tab
  • Configure Table -> Add ID

Expected Behavior

The ID is added as a column in the Diff tab

Observed Behavior

<h1 style="padding: 0px; margin: 0px; font-weight: normal; color: rgb(0, 0, 0); font-family: sans-serif; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">TypeError at /plugins/branching/branches/1/diff/</h1><pre class="exception_value" style="padding: 0px; margin: 10px 0px; font-size: 1.5em; white-space: pre-wrap; word-break: break-word; font-family: sans-serif; color: rgb(87, 87, 87); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">for linkify=True, '1' must have a method get_absolute_url</pre>
Request Method: | GET
-- | --
http://localhost:8000/plugins/branching/branches/1/diff/
5.0.9
TypeError
for linkify=True, '1' must have a method get_absolute_url
/usr/local/lib/python3.12/site-packages/django_tables2/columns/base.py, line 117, in compose_url
netbox_branching.views.BranchDiffView
/usr/local/bin/python
3.12.6
['/opt/netbox/netbox',  '/usr/local/lib/python312.zip',  '/usr/local/lib/python3.12',  '/usr/local/lib/python3.12/lib-dynload',  '/usr/local/lib/python3.12/site-packages',  '__editable__.netbox_inventory-2.0.2.finder.__path_hook__']
Wed, 18 Sep 2024 13:20:01 +0000
@mrmrcoleman mrmrcoleman added the type: bug A confirmed report of unexpected behavior in the application label Sep 18, 2024
@jeremystretch jeremystretch self-assigned this Sep 23, 2024
@jeremystretch
Copy link
Contributor

The bug occurs because there is currently no detail view for the ChangeDiff model. We could work around it, but IMO we should implement the detail view. Marking this as blocked by #145.

Workaround: The changes table can be restored to a working state by clearing its configuration under user preferences.

@jeremystretch
Copy link
Contributor

On second thought, let's go ahead and fix this for the next patch release, and we'll roll out the detail view in v0.6.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants