Rename CustomField object_type to related_object_type #9326

Closed
opened 2025-12-29 20:48:32 +01:00 by adam · 0 comments
Owner

Originally created by @jeremystretch on GitHub (Mar 6, 2024).

Originally assigned to: @jeremystretch on GitHub.

NetBox version

v3.7.3

Feature type

Change to existing functionality

Proposed functionality

Rename the object_type ForeignKey field on CustomField to related_object_type (or any better suggestion).

Use case

Following the renaming of the content_types ManyToManyField to object_types under #15277, the name object_type can now be quite confusing. (object_types defines the types of NetBox objects on which the field appears, whereas object_type indicates the model indicated by an object or multi-object field.) Renaming this field should help avoid user confusion.

Database changes

Rename the object_type ForeignKey field on the CustomField model (effecting a migration).

External dependencies

None

Originally created by @jeremystretch on GitHub (Mar 6, 2024). Originally assigned to: @jeremystretch on GitHub. ### NetBox version v3.7.3 ### Feature type Change to existing functionality ### Proposed functionality Rename the `object_type` ForeignKey field on CustomField to `related_object_type` (or any better suggestion). ### Use case Following the renaming of the `content_types` ManyToManyField to `object_types` under #15277, the name `object_type` can now be quite confusing. (`object_types` defines the types of NetBox objects on which the field appears, whereas `object_type` indicates the model indicated by an object or multi-object field.) Renaming this field should help avoid user confusion. ### Database changes Rename the `object_type` ForeignKey field on the CustomField model (effecting a migration). ### External dependencies None
adam added the status: acceptedtype: featurebreaking change labels 2025-12-29 20:48:32 +01:00
adam closed this issue 2025-12-29 20:48:32 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#9326