Skip to content

Creating/editing Custom Object via API with field type Multiple Object fails #266

@averyhabbott

Description

@averyhabbott

Plugin Version

0.4.0

NetBox Version

4.4.4

Python Version

3.12

Steps to Reproduce

  1. Create Custom Object Type with a Multiple Object field
  2. POST to API to create an object of that type with any number of items in that field

I did this with prefixes on a fresh NetBox install and tried with a single Prefix ID and it still failed

Expected Behavior

Custom Object is created and field is populated

Observed Behavior

Received HTTP 500 Error code with the following text:
{'error': 'The .create() method does not support writable nested fields by '
'default.\n'
'Write an explicit .create() method for serializer '
'netbox_custom_objects.api.serializers.Table1ModelSerializer, or '
'set read_only=True on nested serializer fields.',
'exception': 'AssertionError',
'netbox_version': '4.4.4',
'python_version': '3.12.7'}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions