Image attachments show up under wrong related objects #9444

Closed
opened 2025-12-29 20:50:01 +01:00 by adam · 2 comments
Owner

Originally created by @julianstolp on GitHub (Apr 5, 2024).

Originally assigned to: @arthanson on GitHub.

Deployment Type

Self-hosted

NetBox Version

v4.0-beta1

Python Version

3.10

Steps to Reproduce

  1. Create site 1 /dcim/site/1
  2. create site 2 /dcim/site/2
  3. Create rack 1 /dcim/rack/1 and add it to site2
  4. Add image to rack 1
  5. Go to site 1 look at Images
  6. Image from rack 1 is visible at site 1

Also happens to every other object type if Images is present

Expected Behavior

Images are displayed only if they are related in any way but not the primary key.

Observed Behavior

error

Originally created by @julianstolp on GitHub (Apr 5, 2024). Originally assigned to: @arthanson on GitHub. ### Deployment Type Self-hosted ### NetBox Version v4.0-beta1 ### Python Version 3.10 ### Steps to Reproduce 1. Create site 1 /dcim/site/1 2. create site 2 /dcim/site/2 3. Create rack 1 /dcim/rack/1 and add it to site2 4. Add image to rack 1 5. Go to site 1 look at `Images` 6. Image from rack 1 is visible at site 1 Also happens to every other object type if `Images` is present ### Expected Behavior Images are displayed only if they are related in any way but not the primary key. ### Observed Behavior ![error](https://github.com/netbox-community/netbox/assets/41152397/319190dc-383d-43bc-ae2c-fcacdc59fd43)
adam added the type: bugstatus: acceptedbetaseverity: medium labels 2025-12-29 20:50:01 +01:00
adam closed this issue 2025-12-29 20:50:01 +01:00
Author
Owner

@jeffgdotorg commented on GitHub (Apr 8, 2024):

Thanks for the bug report. Confirmed I can reproduce on a pristine v4.0b1 install.

@jeffgdotorg commented on GitHub (Apr 8, 2024): Thanks for the bug report. Confirmed I can reproduce on a pristine v4.0b1 install.
Author
Owner

@jeremystretch commented on GitHub (Apr 8, 2024):

Image from rack 1 is visible at site 1

Only images attached to site 1 will be listed when viewing the site. You need to view the specific rack to see images attached to it.

@jeremystretch commented on GitHub (Apr 8, 2024): > Image from rack 1 is visible at site 1 Only images attached to site 1 will be listed when viewing the site. You need to view the specific rack to see images attached to it.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#9444