mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-22 20:12:00 -06:00
Fix logger for ScriptJob
This commit is contained in:
parent
7d15ec0bbb
commit
9f1989c179
@ -33,6 +33,9 @@ class ScriptJob(BackgroundJob):
|
||||
data: A dictionary of data to be passed to the script upon execution
|
||||
commit: Passed through to Script.run()
|
||||
"""
|
||||
logger = logging.getLogger(f"netbox.scripts.{script.full_name}")
|
||||
logger.info(f"Running script (commit={commit})")
|
||||
|
||||
try:
|
||||
try:
|
||||
with transaction.atomic():
|
||||
@ -87,9 +90,6 @@ class ScriptJob(BackgroundJob):
|
||||
"""
|
||||
script = ScriptModel.objects.get(pk=job.object_id).python_class()
|
||||
|
||||
logger = logging.getLogger(f"netbox.scripts.{script.full_name}")
|
||||
logger.info(f"Running script (commit={commit})")
|
||||
|
||||
# Add files to form data
|
||||
if request:
|
||||
files = request.FILES
|
||||
|
Loading…
Reference in New Issue
Block a user