Skip to content

Conversation

@bctiemann
Copy link
Contributor

Fixes: #224

Aligns the CustomObjectTypeFieldSerializer with the behavior of CustomFieldSerializer by allowing the user to specify a related_object_type in the POST body rather than app_label and model fields:

{
    "custom_object_type": 26,
    "type": "multiobject",
    "name": "test2",
    "default": [14],
    "related_object_type": "dcim.device"
}

@bctiemann bctiemann changed the title Use a ContentTypeField in CustomObjectTypeFieldSerializer rather than… Fixes: #224 - Use a ContentTypeField in CustomObjectTypeFieldSerializer Dec 5, 2025
@bctiemann
Copy link
Contributor Author

This is technically a breaking change, but since #224 is characterized (correctly) as a bug this is really just aligning to "correct" (core) behavior by using the NetBox-standard ContentTypeField.

@bctiemann bctiemann requested a review from arthanson December 5, 2025 01:34
@bctiemann bctiemann added this to the v0.4.2 milestone Dec 5, 2025
…ted_object_type' into 224-create-object-fields-by-related_object_type
@bctiemann bctiemann changed the base branch from main to feature December 5, 2025 16:19
@bctiemann bctiemann modified the milestones: v0.4.2, v0.5.0 Dec 5, 2025
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

Successfully merging this pull request may close these issues.

app_label and model on API POST custom-object-type-fields is redundant

2 participants