Closed mumaritc closed 3 weeks ago
Can you play with the filters and see what role causes the issue?
Filter for Show Unconnected devices is causing the issue, unchecking it will open the topology views, but no devices or view is showing
Can you play with the filters and see what role causes the issue?
I´ve got the same bug. I changed the Role images and can´t open the Topology view. I removed all filters and the topology view will open now but don´t show anything.
I also can´t change the picture again. If I click the button an error message will appear:
If I activate some filters this error Message will appear by opening the topology view:
The console in my browser display this error message:
I hope this will help to fix the error.
Thanks for your report. Can anyone of you show the content of the table 'netbox_topology_views_roleimage'?
You can use dbshell for this task:
3. select * from netbox_topology_views_roleimage;
Hello deng,
of course. I´ve did a screenshot.
My guess is that I have to delete the double entries right? But why were they created multiple times? is that a bug?
Hello deng,
The numbers in column "object_id" should be unique. It is save to delete any rows in that table. Just use dbshell:
delete from netbox_topology_views_roleimage where object_id = OBJECT_ID_TO_BE_DELETED;
I don't know what caused this situation. The object_id belongs to the role id. Have you deleted one or more roles and added new roles after that?
The numbers in column "object_id" should be unique. It is save to delete any rows in that table. Just use dbshell:
delete from netbox_topology_views_roleimage where object_id = OBJECT_ID_TO_BE_DELETED;
I changed your command a bit. I used: delete from netbox_topology_views_roleimage where id = ID_TO_BE_DELETED;
with this command I can just delete the duplicates and I don´t need to save the images again (Reduce the risk to run again in this bug).
I don't know what caused this situation. The object_id belongs to the role id. Have you deleted one or more roles and added new roles after that?
I dind´t changed anything at the role names. I just selected the images for the roles, hit the save button and after that the error Message occured. It was a bit strange but now I know how to fix this issue. Thank you a lot.
I played around a bit and I couldn't reproduce such a situation. I created new roles, assigned images, deleted some roles... the table was always in a correct state.
@mumaritc Have you got any hints what may have caused this situation?
NetBox version
v4.0.7
Topology Views version
v4.0.0
Steps to Reproduce
Expected Behavior
Show the Topology view
Observed Behavior
Server Error shows up: <class 'netbox_topology_views.models.RoleImage.MultipleObjectsReturned'>
get() returned more than one RoleImage -- it returned 2!
Python version: 3.10.12 NetBox version: 4.0.7 Plugins: netbox_topology_views: 4.0.0
Images are not duplicate as shown![image](https://github.com/netbox-community/netbox-topology-views/assets/95227526/f19324c8-31c8-433b-a1a5-28c33d44a4fa)