Skip to content

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

@Wythetells

Description

@Wythetells

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.

Metadata

Metadata

Assignees

Labels

severity: lowDoes not significantly disrupt application functionality, or a workaround is availablestatus: acceptedThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the application

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions