Skip to content
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

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

Closed
barnebyte-timewarp opened this issue Nov 22, 2022 · 0 comments
Assignees
Labels
status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@barnebyte-timewarp
Copy link
Contributor

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

@barnebyte-timewarp barnebyte-timewarp added the type: bug A confirmed report of unexpected behavior in the application label Nov 22, 2022
@barnebyte-timewarp barnebyte-timewarp changed the title Cannot edit IP addresses that are assigned to VMs without a cluster Cannot edit IP addresses which have a NAT IP that is assigned to a VM without a cluster Nov 22, 2022
@jeremystretch jeremystretch self-assigned this Nov 22, 2022
@jeremystretch jeremystretch added the status: accepted This issue has been accepted for implementation label Nov 22, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

No branches or pull requests

2 participants