Skip to content

Can't create custom object instance | 'Table1Model' object has no attribute #424

@adrikacang

Description

@adrikacang

Plugin Version

4.0.6

NetBox Version

4.4.7-Docker-3.4.2

Python Version

3.12.3

Steps to Reproduce

  1. Create "custom-object-types" and "custom-object-type-fields" with API
  2. Create custom object instance for that custom object (with api or ui)
    api -> POST: /api/plugins/custom-objects/cpe/ {"inkoppling_interface": 2053, "namn": 77}
    ui -> Image

Expected Behavior

It should be able to successfully create the object instance

Observed Behavior

Server Error:

API -> {
"error": "Table1Model() got unexpected keyword arguments: 'inkoppling_interface', 'namn'",
"exception": "TypeError",
"netbox_version": "4.4.7-Docker-3.4.2",
"python_version": "3.12.3"
}

UI - >'Table1Model' object has no attribute 'inkoppling_interface'Image

It seems the fields are not found, although is already created when I check It:

UI ->
Image

API ->

GET api/plugins/custom-objects/custom-object-types/1/,
{
    "id": 1,
    "url": "http://localhost:8003/api/plugins/custom-objects/custom-object-types/1/",
    "name": "cpe",
    "verbose_name": "Customer Premise Equipment",
    "verbose_name_plural": "",
    "slug": "cpe",
    "description": "Customer premises equipment object",
    "tags": [],
    "created": "2026-03-12T05:02:24.012582Z",
    "last_updated": "2026-03-12T05:02:24.058080Z",
    "fields": [
        {
            "id": 12,
            "name": "inkoppling_interface",
            "label": "Inkoppling Interface",
            "custom_object_type": 1,
            "description": "",
            "type": "object",
            "primary": false,
            "required": false,
            "unique": false,
            "default": null,
            "choice_set": null,
            "validation_regex": "",
            "validation_minimum": null,
            "validation_maximum": null,
            "related_object_type": 9,
            "related_object_filter": null,
            "group_name": "",
            "search_weight": 500,
            "filter_logic": "loose",
            "ui_visible": "always",
            "ui_editable": "yes",
            "weight": 100,
            "is_cloneable": false,
            "comments": ""
        },
        {
            "id": 13,
            "name": "namn",
            "label": "Namn",
            "custom_object_type": 1,
            "description": "",
            "type": "object",
            "primary": false,
            "required": false,
            "unique": false,
            "default": null,
            "choice_set": null,
            "validation_regex": "",
            "validation_minimum": null,
            "validation_maximum": null,
            "related_object_type": 12,
            "related_object_filter": null,
            "group_name": "",
            "search_weight": 500,
            "filter_logic": "loose",
            "ui_visible": "always",
            "ui_editable": "yes",
            "weight": 100,
            "is_cloneable": false,
            "comments": ""
        }
    ],
    "table_model_name": "Table1Model",
    "object_type_name": "netbox_custom_objects.table1model"
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions