Run Again button does not respect script variable defaults #11923

Open
opened 2025-12-29 21:51:32 +01:00 by adam · 4 comments
Owner

Originally created by @llamafilm on GitHub (Dec 14, 2025).

Originally assigned to: @llamafilm on GitHub.

NetBox Edition

NetBox Community

NetBox Version

v4.4.6

Python Version

3.12

Steps to Reproduce

  1. Create a custom script with BooleanVar(default=True)
  2. Run that script using the "Run again" button on the script list page.
image

Expected Behavior

It should run the script with all variables set to their default value.

Observed Behavior

The BooleanVar value is False

Originally created by @llamafilm on GitHub (Dec 14, 2025). Originally assigned to: @llamafilm on GitHub. ### NetBox Edition NetBox Community ### NetBox Version v4.4.6 ### Python Version 3.12 ### Steps to Reproduce 1. Create a custom script with `BooleanVar(default=True)` 2. Run that script using the "Run again" button on the script list page. <img width="2394" height="564" alt="image" src="https://github.com/user-attachments/assets/4f7d01f9-396d-4f35-9c8f-171f1f0bc367" /> ### Expected Behavior It should run the script with all variables set to their default value. ### Observed Behavior The BooleanVar value is False
adam added the type: bugstatus: acceptednetboxseverity: low labels 2025-12-29 21:51:32 +01:00
Author
Owner

@llamafilm commented on GitHub (Dec 14, 2025):

I volunteer to fix this, if it's accepted. I'm curious if there's any good reason for the current behavior.

@llamafilm commented on GitHub (Dec 14, 2025): I volunteer to fix this, if it's accepted. I'm curious if there's any good reason for the current behavior.
Author
Owner

@jnovinger commented on GitHub (Dec 15, 2025):

@llamafilm , I'm a little confused. Your expected and observed behavior seem to be contradicting each other. Given the BooleanVar(default=False) in the STR, isn't False the default that should be expected and is observed?

This seems to behave as expected in my local:

Image
@jnovinger commented on GitHub (Dec 15, 2025): @llamafilm , I'm a little confused. Your expected and observed behavior seem to be contradicting each other. Given the `BooleanVar(default=False)` in the STR, isn't `False` the default that should be expected and is observed? This seems to behave as expected in my local: <img width="1135" height="279" alt="Image" src="https://github.com/user-attachments/assets/4e5fab5f-91da-4360-a198-447e3818905e" />
Author
Owner

@llamafilm commented on GitHub (Dec 15, 2025):

Oops,sorry! I meant to say the default value is True. I just edited it.

@llamafilm commented on GitHub (Dec 15, 2025): Oops,sorry! I meant to say the default value is True. I just edited it.
Author
Owner

@jnovinger commented on GitHub (Dec 15, 2025):

Thanks @llamafilm, assigned to you. I don't have any information about why this behaves like this, but it does seem incorrect.

@jnovinger commented on GitHub (Dec 15, 2025): Thanks @llamafilm, assigned to you. I don't have any information about why this behaves like this, but it does seem incorrect.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#11923