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

The direct execution button on the custom script list page fails to work. #18965

Open
Wythetells opened this issue Mar 20, 2025 · 0 comments
Open
Labels
status: needs triage This issue is awaiting triage by a maintainer type: bug A confirmed report of unexpected behavior in the application

Comments

@Wythetells
Copy link

Deployment Type

Self-hosted

NetBox Version

v4.2.5

Python Version

3.11

Steps to Reproduce

1、Select any script that does not require additional parameters but can update the database, and directly click "Run" on the custom script list page.

Image

2、The running result prompts that the stack group has been associated.

Image

3、Virtual Chassis is not associated with any devices.

Image

4、Click on the script details page (by default, the "commit changes" option is selected), and then click "Run Script".

Image

5、The database has been modified and the update is successful.

Image

Expected Behavior

When clicking the "Run" button on the list page, submit the database modification.

The document shows that

The checkbox to commit database changes when executing a script is checked by default.

Image

And my script doesn't have "commit_default" set.


class StackDetection(Script):
    class Meta:
        name = "堆叠检测维护(VirtualChassis)"
        description = "根据设备名称自动创建虚拟堆叠"

    def run(self, data, commit):
···

Observed Behavior

When clicking "Run" on the list page, perform a dry-run.

@Wythetells Wythetells added status: needs triage This issue is awaiting triage by a maintainer type: bug A confirmed report of unexpected behavior in the application labels Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs triage This issue is awaiting triage by a maintainer type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

No branches or pull requests

1 participant