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

Fixes #18480: use script form's cleaned data when calling script from CLI #18612

Merged

Conversation

matejv
Copy link
Contributor

@matejv matejv commented Feb 10, 2025

Fixes: #18480

When calling netbox script via runscript CLI command we pass cleaned_data to script so any so ObjectVar and other field values have proper types in script's data variable.

Before passing data we remove values that are added by ScriptForm in a similar was as in ScriptView (extras/views.py)

so ObjectVar and other field values have proper types in script's data variable
Copy link
Member

@jeremystretch jeremystretch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @matejv!

@jeremystretch jeremystretch merged commit 299bde9 into netbox-community:main Feb 10, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

runscript cli comand does not pass cleaned data to script
2 participants