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

Circuit terminations aren't displaying #10

Closed
martydingo opened this issue May 17, 2020 · 3 comments
Closed

Circuit terminations aren't displaying #10

martydingo opened this issue May 17, 2020 · 3 comments
Assignees

Comments

@martydingo
Copy link

Hiya there,

I seem to have an issue with Circuit Terminations showing.

Everything works and is fine if not involving any circuits, but as soon as you include a device or site that holds a circuit termination, I get the following error.

Internal Server Error: /api/plugins/topology-views/search/search/
Traceback (most recent call last):
  File "/srv/netbox/venv/lib/python3.7/site-packages/django/core/handlers/exception.py", line 34, in inner
    response = get_response(request)
  File "/srv/netbox/venv/lib/python3.7/site-packages/django/core/handlers/base.py", line 115, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/srv/netbox/venv/lib/python3.7/site-packages/django/core/handlers/base.py", line 113, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/srv/netbox/venv/lib/python3.7/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
    return view_func(*args, **kwargs)
  File "/srv/netbox/venv/lib/python3.7/site-packages/rest_framework/viewsets.py", line 114, in view
    return self.dispatch(request, *args, **kwargs)
  File "/srv/netbox/venv/lib/python3.7/site-packages/rest_framework/views.py", line 505, in dispatch
    response = self.handle_exception(exc)
  File "/srv/netbox/venv/lib/python3.7/site-packages/rest_framework/views.py", line 465, in handle_exception
    self.raise_uncaught_exception(exc)
  File "/srv/netbox/venv/lib/python3.7/site-packages/rest_framework/views.py", line 476, in raise_uncaught_exception
    raise exc
  File "/srv/netbox/venv/lib/python3.7/site-packages/rest_framework/views.py", line 502, in dispatch
    response = handler(request, *args, **kwargs)
  File "/srv/netbox/venv/lib/python3.7/site-packages/netbox_topology_views/api/views.py", line 133, in search
    edge["to"] = cable.termination_b.device.id
AttributeError: 'CircuitTermination' object has no attribute 'device'
@mattieserver
Copy link
Collaborator

I had not tested the plugin for Circuit terminations.
I will add some terminations in my test setup and check if i can fix it.

@mattieserver mattieserver self-assigned this May 17, 2020
@mattieserver
Copy link
Collaborator

I excluded the "circuit termination" cable type for now.
I will look into adding support for Circuit Terminations later on but if you update to the latest version you should not have the issue anymore.

@martydingo
Copy link
Author

Shouldn't this be left open as it's still an active issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants