Skip to content

Group is required attribute on Contact object when using REST API #7771

@rodvand

Description

@rodvand

NetBox version

v3.1-beta1

Python version

3.8

Steps to Reproduce

curl -X POST \
-H "Authorization: Token TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json; indent=4" \
https://NETBOX/api/tenancy/contacts/ \
--data '{
    "name": "Martin"
}'

Expected Behavior

Contact is created.

Observed Behavior

{
    "group": [
        "This field is required."
    ]
}

In the API docs the group attribute is set as required, while it is not (at least visibly) required in the NetBox UI.

Adding "group": null to the curl command allows the contact to be created.

Metadata

Metadata

Assignees

Labels

betaConcerns a bug/feature in a beta releasestatus: acceptedThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the application

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions