Skip to content

Conversation

@jnovinger
Copy link
Member

@jnovinger jnovinger commented Mar 26, 2025

Fixes: #18965

For the ScriptListView, we're rendering one-off forms directly in HTML for each of the scripts in a module. Previous to this change, that form consisted only of a hidden CSRF token input and the Run/Run Again button. This meant that that the post handler was interpreting the incoming request.POST as indicating _commit=False, essentially.

This change checks the script's associated python_class.commit_default attribute and conditionally renders a hidden _commit checkbox input for each script's form in ScriptListView so that the post handler will behave accordingly. This has the added benefit of ensuring that the commit default checkbox button is rendered checked or not correctly on the subsequent ScriptView if the RQ worker is not available.

@jnovinger jnovinger requested review from a team and jeremystretch and removed request for a team March 26, 2025 16:20
@jeremystretch jeremystretch merged commit e1e5142 into main Mar 27, 2025
6 checks passed
@jeremystretch jeremystretch deleted the 18965-run-script-w-commit-from-script-list branch March 27, 2025 12:39
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 27, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

3 participants