-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
severity: lowDoes not significantly disrupt application functionality, or a workaround is availableDoes not significantly disrupt application functionality, or a workaround is availablestatus: needs ownertype: bug
Description
Plugin Version
0.3.1
NetBox Version
4.4.0
Python Version
3.12.3
Steps to Reproduce
API endpoint POST custom-object-type-fields
requires model
and app_label
, despite at the same time requiring related_object_type
which is an ID. model
and app_label
can be instead determined by the related_object_type
, based on DB table django_content_type
. I believe this is how it's done for other endpoints.
custom_object_field_relational = {
'custom_object_type': custom_obj1_id,
'name': 'related_obj2',
'label': 'Related Obj 2',
'type': 'object',
'primary': False,
'related_object_type': custom_obj2_id,
# Paremeters below should not be needed, as they can be determined by 'related_object_type'
'app_label': 'netbox_custom_objects',
'model': f'table{custom_obj1_id}model',
}
To reproduce:
- Create Custom Object1
- Create Custom Object2
- Try creating via API a field for Custom Object1 that related to Custom Object2
Expected Behavior
Expected behavior:
API call does not need app_label
and model
Observed Behavior
Observed behavior:
app_label
and model
need to be passed in the call
Metadata
Metadata
Assignees
Labels
severity: lowDoes not significantly disrupt application functionality, or a workaround is availableDoes not significantly disrupt application functionality, or a workaround is availablestatus: needs ownertype: bug