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

Fix Virtual Machine ID selection and minor bug #87

Merged
merged 5 commits into from
Mar 14, 2023

Conversation

Gskill75
Copy link
Contributor

Hello,
I have corrected these errors:

"GET /api/virtualization/interfaces/?virtual_machine=6&name=net0&limit=0 HTTP/1.1" 400 85 "-" "python-requests/2.28.2"
The request failed with code 400 Bad Request: {'virtual_machine': ['Select a valid choice. 6 is not one of the available choices.']}

File "/opt/netbox/venv/lib/python3.10/site-packages/netbox_proxbox/proxbox_api/updates/virtual_machine.py", line 327, in interfaces
    _ntb_if.append({'name': interface.name, 'mac_address': interface.mac_address.lower(), 'mtu': interface.mtu})
AttributeError: 'NoneType' object has no attribute 'lower'

for the second error I just deleted the lower.
To improve it would be necessary to see to convert the mac in strings if it is really necessary.

@emersonfelipesp emersonfelipesp added the under review Further discussion is needed to determine this issue's scope and/or implementation label Mar 14, 2023
@emersonfelipesp emersonfelipesp self-requested a review March 14, 2023 14:12
@emersonfelipesp emersonfelipesp added bug Further discussion is needed to determine this issue's scope and/or implementation accepted This issue has been accepted for implementation and removed under review Further discussion is needed to determine this issue's scope and/or implementation labels Mar 14, 2023
@emersonfelipesp emersonfelipesp merged commit 3686219 into netdevopsbr:develop Mar 14, 2023
@emersonfelipesp emersonfelipesp changed the title fix Fix Virtual Machine ID selection and minor bug Mar 14, 2023
@emersonfelipesp
Copy link
Member

Thank you @Gskill75 for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted This issue has been accepted for implementation bug Further discussion is needed to determine this issue's scope and/or implementation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants