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

Tracing from mid-point fails with not defined exception #5374

Closed
DanSheps opened this issue Nov 24, 2020 · 0 comments
Closed

Tracing from mid-point fails with not defined exception #5374

DanSheps opened this issue Nov 24, 2020 · 0 comments
Assignees
Labels
beta Concerns a bug/feature in a beta release status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@DanSheps
Copy link
Member

DanSheps commented Nov 24, 2020

Environment

  • Python version: 3.7
  • NetBox version: 2.10-beta1 (develop)

Steps to Reproduce

  1. Create a device (switch) with a interface
  2. Create a device (panel 1) with front and rear ports
  3. Create another device (panel 2) with front and rear ports
  4. Connect switch interface to panel 1 front port
  5. Connect panel 1 rear port to panel 2 rear port
  6. Go to panel 2 rear port and attempt a trace

Expected Behavior

Trace completes to switch

Observed Behavior

Trace fails

<class 'NameError'>

name 'obj' is not defined

Traceback:

Traceback (most recent call last):
  File "/usr/local/netbox/venv/lib64/python3.6/site-packages/django/core/handlers/exception.py", line 47, in inner
    response = get_response(request)
  File "/usr/local/netbox/venv/lib64/python3.6/site-packages/django/core/handlers/base.py", line 179, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/usr/local/netbox/venv/lib64/python3.6/site-packages/django/views/generic/base.py", line 70, in view
    return self.dispatch(request, *args, **kwargs)
  File "/usr/local/netbox/netbox/dcim/views.py", line 2068, in dispatch
    return super().dispatch(request, *args, **kwargs)
  File "/usr/local/netbox/netbox/utilities/views.py", line 91, in dispatch
    return super().dispatch(request, *args, **kwargs)
  File "/usr/local/netbox/venv/lib64/python3.6/site-packages/django/views/generic/base.py", line 98, in dispatch
    return handler(request, *args, **kwargs)
  File "/usr/local/netbox/netbox/netbox/views/generic.py", line 70, in get
    **self.get_extra_context(request, instance),
  File "/usr/local/netbox/netbox/dcim/views.py", line 2079, in get_extra_context
    related_paths = CablePath.objects.filter(path__contains=obj).prefetch_related('origin')

Exception Type: NameError at /dcim/rear-ports/3950/trace/ Exception Value: name 'obj' is not defined

Additional Info

  • Adding a device with a interface on the other end of panel 2 and tracing produces same result
  • Tracing from added device works correctly however
@DanSheps DanSheps added type: bug A confirmed report of unexpected behavior in the application status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation beta Concerns a bug/feature in a beta release status: accepted This issue has been accepted for implementation and removed status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation labels Nov 24, 2020
@DanSheps DanSheps self-assigned this Nov 24, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
beta Concerns a bug/feature in a beta release status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

No branches or pull requests

1 participant