mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-29 11:56:25 -06:00
Fix non-null constraint for script execution
Withc34a0e2
, validation of job object fields is enabled, so ScriptJob must not set required fields to empty strings. This commit revertsb18f193
and (hopefully) fixes this issue not only for UI views, but for all interactions with scripts. Fixes: #17923
This commit is contained in:
parent
27d15615b3
commit
a19bdd0c9f
@ -22,9 +22,7 @@ class ScriptJob(JobRunner):
|
||||
"""
|
||||
|
||||
class Meta:
|
||||
# An explicit job name is not set because it doesn't make sense in this context. Currently, there's no scenario
|
||||
# where jobs other than this one are used. Therefore, it is hidden, resulting in a cleaner job table overview.
|
||||
name = ''
|
||||
name = 'Run Script'
|
||||
|
||||
def run_script(self, script, request, data, commit):
|
||||
"""
|
||||
|
@ -1181,7 +1181,6 @@ class ScriptView(BaseScriptView):
|
||||
request=copy_safe_request(request),
|
||||
job_timeout=script.python_class.job_timeout,
|
||||
commit=form.cleaned_data.pop('_commit'),
|
||||
name=script.name
|
||||
)
|
||||
|
||||
return redirect('extras:script_result', job_pk=job.pk)
|
||||
|
Loading…
Reference in New Issue
Block a user