Skip to content

Commit d122c33

Browse files
arthansonjeremystretch
authored andcommitted
18044 enable alert for plugins in script
1 parent 24b7679 commit d122c33

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

netbox/extras/views.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1141,12 +1141,14 @@ def get(self, request, **kwargs):
11411141
script_class = self._get_script_class(script)
11421142
if not script_class:
11431143
return render(request, 'extras/script.html', {
1144+
'object': script,
11441145
'script': script,
11451146
})
11461147

11471148
form = script_class.as_form(initial=normalize_querydict(request.GET))
11481149

11491150
return render(request, 'extras/script.html', {
1151+
'object': script,
11501152
'script': script,
11511153
'script_class': script_class,
11521154
'form': form,
@@ -1162,6 +1164,7 @@ def post(self, request, **kwargs):
11621164
script_class = self._get_script_class(script)
11631165
if not script_class:
11641166
return render(request, 'extras/script.html', {
1167+
'object': script,
11651168
'script': script,
11661169
})
11671170

@@ -1186,6 +1189,7 @@ def post(self, request, **kwargs):
11861189
return redirect('extras:script_result', job_pk=job.pk)
11871190

11881191
return render(request, 'extras/script.html', {
1192+
'object': script,
11891193
'script': script,
11901194
'script_class': script.python_class(),
11911195
'form': form,

0 commit comments

Comments
 (0)