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

virtual-chassis position zero #7564

Closed
PieterL75 opened this issue Oct 18, 2021 · 5 comments
Closed

virtual-chassis position zero #7564

PieterL75 opened this issue Oct 18, 2021 · 5 comments
Assignees
Labels
status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@PieterL75
Copy link
Contributor

NetBox version

v3.0.7

Python version

3.7

Steps to Reproduce

  1. Create 2 devices
  2. Create a new virtual chassis
  3. Set the Initial position to zero
  4. add the 2 devices
  5. Create the Virtual Chassis

Next one, also related

  1. Edit the virtual chassis
  2. Set the posistions to 0 an 1
  3. Save the VC
  4. check the overview of devices in the VC

Expected Behavior

A new VC is created with 2 members. with position 0 en 1.
The GUI shows the 0 and 1 position in a gray box

Observed Behavior

The members are created with position 1 and 2.
image

After correcting: The position 0 is not displayed
image

@PieterL75 PieterL75 added the type: bug A confirmed report of unexpected behavior in the application label Oct 18, 2021
@PieterL75
Copy link
Contributor Author

First issue seems to be related to this :

initial_position = self.cleaned_data.get('initial_position') or 1

This will cause 'initial_position' to become '1' if the get('initial_position') equals to {int}0
a=0
b=a or 1
b becomes 1
It can be fixed with
initial_position = self.cleaned_data.get('initial_position') if initial_position != None else 1

The second can be solved with this :


Change that to
'value': str(value),

@DanSheps
Copy link
Member

What NOS allows a position of "0" for a virtual chassis?

@DanSheps DanSheps added the status: under review Further discussion is needed to determine this issue's scope and/or implementation label Oct 18, 2021
@PieterL75
Copy link
Contributor Author

PieterL75 commented Oct 18, 2021 via email

@DanSheps DanSheps added status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation and removed status: under review Further discussion is needed to determine this issue's scope and/or implementation labels Oct 19, 2021
@PieterL75
Copy link
Contributor Author

You can assign it to me..

@DanSheps DanSheps added status: accepted This issue has been accepted for implementation and removed status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation labels Oct 19, 2021
@jeremystretch
Copy link
Member

Argh. Fixed in 3cb8c5d but I typoed the commit message.

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

Successfully merging a pull request may close this issue.

3 participants