Skip to content

Contact group assignments are not recorded in changelog #19444

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jeremystretch opened this issue May 8, 2025 · 1 comment · May be fixed by #19456
Open

Contact group assignments are not recorded in changelog #19444

jeremystretch opened this issue May 8, 2025 · 1 comment · May be fixed by #19456
Assignees
Labels
severity: medium Results in substantial degraded or broken functionality for specfic workflows status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@jeremystretch
Copy link
Member

jeremystretch commented May 8, 2025

Deployment Type

Self-hosted

NetBox Version

v4.3.0

Python Version

3.10

Steps to Reproduce

  1. Create a contact group named Group 1
  2. Create a contact named Contact 1 and assign it to the group
  3. Inspect the creation record for the contact in the changelog

Expected Behavior

The assigned group should appear in a groups list in the serialized representation of the contact.

Observed Behavior

There is no groups field in the changelog data:

{
    'link': '',
    'name': 'Contact 1',
    'tags': [],
    'email': '',
    'phone': '',
    'title': '',
    'address': '',
    'created': '2025-05-08T19:14:40.686Z',
    'comments': '',
    'description': '',
    'custom_fields': {}
}
@jeremystretch jeremystretch self-assigned this May 8, 2025
@jeremystretch jeremystretch added type: bug A confirmed report of unexpected behavior in the application status: accepted This issue has been accepted for implementation severity: medium Results in substantial degraded or broken functionality for specfic workflows labels May 8, 2025
@jeremystretch
Copy link
Member Author

The root cause here is that Django's PythonSerializer doesn't know how to handle many-to-many fields which use a custom through model (see handle_m2m_field()).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity: medium Results in substantial degraded or broken functionality for specfic workflows status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant