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

Closed
opened 2025-12-29 19:40:54 +01:00 by adam · 0 comments
Owner

Originally created by @tyler-8 on GitHub (May 6, 2022).

Originally assigned to: @jeremystretch on GitHub.

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.']}

Originally created by @tyler-8 on GitHub (May 6, 2022). Originally assigned to: @jeremystretch on GitHub. ### 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.']}`
adam added the type: bugstatus: accepted labels 2025-12-29 19:40:54 +01:00
adam closed this issue 2025-12-29 19:40:54 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#6455