Skip to content

Contact Assignment Priority is Required in API, not in GUI #9311

@tyler-8

Description

@tyler-8

NetBox version

v3.2.2

Python version

3.9

Steps to Reproduce

  1. Create a Site
  2. Create a Contact Role, "Main Phone"
  3. Create a Contact with name, phone fields filled out
  4. Using the /tenancy/contact-assignments/ API, perform a POST operation to create a new assignment using the site, contact, and role in previous steps, but don't add the priority field.

Expected Behavior

HTTP 201 with the Contact Assignment being created successfully, and null as the Priority field value.

Not all Contacts are going to have or require a "priority" so it makes sense to have this as an optional field. In the GUI, the Priority field is optional and displays a - as I would expect when that field is blank.

Observed Behavior

HTTP 400

{'priority': ['This field is required.']}

Metadata

Metadata

Assignees

Labels

status: 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