Fixes #20977: Missing script variables use their default value if defined #468

Closed
opened 2026-04-05 16:34:38 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @llamafilm on 1/26/2026

Fixes: #20977

  • When a variable is missing from a custom script submission, it will be filled with its default value, if defined. This is most useful for BooleanVars when clicking the "Run Again" button, but would also apply to other variables if left blank in the UI.

  • Add a test case for this.

  • Remove the default value from test_script_validation_error_displays_message so it properly displays a validation error.

*Originally created by @llamafilm on 1/26/2026* ### Fixes: #20977 * When a variable is missing from a custom script submission, it will be filled with its default value, if defined. This is most useful for BooleanVars when clicking the "Run Again" button, but would also apply to other variables if left blank in the UI. * Add a test case for this. * Remove the default value from `test_script_validation_error_displays_message` so it properly displays a validation error.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/netbox#468