Skip to content

Cannot edit IP addresses which have a NAT IP that is assigned to a VM without a cluster #10997

@barnebyte-timewarp

Description

@barnebyte-timewarp

NetBox version

v3.3.8

Python version

3.8

Steps to Reproduce

  1. Assign an IP to an interface of a VM that doesn't have a cluster
    image
    image

  2. Set NAT IP (Inside) of an IP Address to the IP referenced in 1st point
    image

  3. Try to edit the IP address referenced in 2nd point
    image

You get an error:
File "/opt/netbox/netbox/ipam/forms/models.py", line 432, in init
initial['nat_cluster'] = nat_inside_parent.virtual_machine.cluster.pk
AttributeError: 'NoneType' object has no attribute 'pk'

Expected Behavior

The Edit view should be rendered

Observed Behavior

An AttributeError: 'NoneType' object has no attribute 'pk' is raised

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