Skip to content

TypeError when bulking editing ASNs with a site #9682

@cpmoves

Description

@cpmoves

NetBox version

v3.2.5

Python version

3.10

Steps to Reproduce

  1. Select multiple ASNs
  2. Click Edit Selected and select a site from the Sites drop down menu
  3. Click Apply

Expected Behavior

The site will be added to the select ASNs

Observed Behavior

TypeError at /ipam/asns/edit/
Direct assignment to the reverse side of a many-to-many set is prohibited. Use sites.set() instead.
Request Method: POST
Request URL: http://netbox/ipam/asns/edit/
Django Version: 4.0.5
Exception Type: TypeError
Exception Value:
Direct assignment to the reverse side of a many-to-many set is prohibited. Use sites.set() instead.
Exception Location: /opt/netbox-3.2.5/venv/lib/python3.10/site-packages/django/db/models/fields/related_descriptors.py, line 595, in set
Python Executable: /opt/netbox-3.2.5/venv/bin/python3.10
Python Version: 3.10.4
Python Path:
['/opt/netbox/netbox',
'/opt/netbox-3.2.5',
'/opt/netbox-3.2.5/venv/bin',
'/usr/local/python3/lib/python310.zip',
'/usr/local/python3/lib/python3.10',
'/usr/local/python3/lib/python3.10/lib-dynload',
'/opt/netbox-3.2.5/venv/lib/python3.10/site-packages']

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