Cannot assign contact to prefix in 3.7 #9131

Closed
opened 2025-12-29 20:46:04 +01:00 by adam · 1 comment
Owner

Originally created by @konsta21 on GitHub (Jan 22, 2024).

Deployment Type

Self-hosted

NetBox Version

v3.7.1

Python Version

3.10

Steps to Reproduce

  1. Create sample prefix. In my case the sample prefix ID is "645"
  2. Create sample contact named "Sample Contact". In my case the sample contact ID is "25"
  3. Create sample contact role named "Sample Contact Role"
  4. Click on "Contact Assignment" option:
    image
  5. Then add the following text with the "Import" button:
    content_type,object_id,contact.id,role
    'ipam.prefix',645,25,'Sample Contact Role'

Expected Behavior

The operation should be successful and prefix object should receive a contact assigned to it. Although contact is not visible from the prefix side:
image

It can be seen as existing from the "Contact Assignment" tab:
image

Observed Behavior

In previous version (e.g. 3.6.6) this worked fine. However, with the new 3.7 and 3.7.1 it errors with:
Annotation 2024-01-22 175452

Interestingly, this process works fine when trying the same approach to import a contact to a device, as seen here:
image

Originally created by @konsta21 on GitHub (Jan 22, 2024). ### Deployment Type Self-hosted ### NetBox Version v3.7.1 ### Python Version 3.10 ### Steps to Reproduce 1. Create sample prefix. In my case the sample prefix ID is "645" 2. Create sample contact named "Sample Contact". In my case the sample contact ID is "25" 3. Create sample contact role named "Sample Contact Role" 4. Click on "Contact Assignment" option: ![image](https://github.com/netbox-community/netbox/assets/118549206/e27ae472-04b3-4ac7-8ec7-f127160ae774) 5. Then add the following text with the "Import" button: _content_type,object_id,contact.id,role 'ipam.prefix',645,25,'Sample Contact Role'_ ### Expected Behavior The operation should be successful and prefix object should receive a contact assigned to it. Although contact is not visible from the prefix side: ![image](https://github.com/netbox-community/netbox/assets/118549206/4baaa7e2-a876-46bd-8354-c38718264271) It can be seen as existing from the "Contact Assignment" tab: ![image](https://github.com/netbox-community/netbox/assets/118549206/261574c3-6050-4c3c-b9f3-88f9e8bf1264) ### Observed Behavior In previous version (e.g. 3.6.6) this worked fine. However, with the new 3.7 and 3.7.1 it errors with: <img width="491" alt="Annotation 2024-01-22 175452" src="https://github.com/netbox-community/netbox/assets/118549206/c986af7a-e1e1-4d92-9014-796bba6128ed"> Interestingly, this process works fine when trying the same approach to import a contact to a device, as seen here: ![image](https://github.com/netbox-community/netbox/assets/118549206/15cd5383-6f30-4f14-a94b-6021205a350f)
adam closed this issue 2025-12-29 20:46:04 +01:00
Author
Owner

@jeremystretch commented on GitHub (Jan 22, 2024):

Assigning a contact to a prefix is not currently supported. There is a feature request open to implement this; please see #13764.

@jeremystretch commented on GitHub (Jan 22, 2024): Assigning a contact to a prefix is not currently supported. There is a feature request open to implement this; please see #13764.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#9131