v3.2.0-beta1: Custom Object Field-Relationship "orphaned" after deletion of related object #6099

Closed
opened 2025-12-29 19:36:47 +01:00 by adam · 1 comment
Owner

Originally created by @moonrail on GitHub (Feb 16, 2022).

Originally assigned to: @jeremystretch on GitHub.

NetBox version

v3.2.0-beta1

Python version

3.8

Steps to Reproduce

Tested in https://beta-demo.netbox.dev/

  1. Create a Custom Field on e.g. dcim.interface of type Multiple objects to Content-Type tenancy.tenant
  2. Create a tenancy.tenant
  3. Create a dcim.interface
  4. Assign the created Tenant to the Interface on the previously created Custom Field
  5. Delete the Tenant
  6. Inspect the Interface

Expected Behavior

Either the deletion of the Tenant should be prohibited, as it is still referenced.
Or the reference is cleaned up correctly on the Interface.

Observed Behavior

Tenant can be deleted, but the reference is seemingly not being cleaned up on the Interface:

https://beta-demo.netbox.dev/dcim/interfaces/1/
Screenshot_20220216_103455

Originally created by @moonrail on GitHub (Feb 16, 2022). Originally assigned to: @jeremystretch on GitHub. ### NetBox version v3.2.0-beta1 ### Python version 3.8 ### Steps to Reproduce Tested in https://beta-demo.netbox.dev/ 1. Create a Custom Field on e.g. `dcim.interface` of type `Multiple objects` to Content-Type `tenancy.tenant` 2. Create a `tenancy.tenant` 3. Create a `dcim.interface` 4. Assign the created Tenant to the Interface on the previously created Custom Field 5. Delete the Tenant 6. Inspect the Interface ### Expected Behavior Either the deletion of the Tenant should be prohibited, as it is still referenced. Or the reference is cleaned up correctly on the Interface. ### Observed Behavior Tenant can be deleted, but the reference is seemingly not being cleaned up on the Interface: https://beta-demo.netbox.dev/dcim/interfaces/1/ ![Screenshot_20220216_103455](https://user-images.githubusercontent.com/40096303/154236428-b2168158-c828-4445-a98f-2caadcb9837b.png)
adam added the type: bugstatus: acceptedbeta labels 2025-12-29 19:36:47 +01:00
adam closed this issue 2025-12-29 19:36:47 +01:00
Author
Owner

@jeremystretch commented on GitHub (Feb 16, 2022):

This looks like a simple bug with the template display.

@jeremystretch commented on GitHub (Feb 16, 2022): This looks like a simple bug with the template display.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#6099