mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
* start() and terminate() methods on Job should call save() * Fix display of associated jobs * Introduce get_latest_jobs() method on JobsMixin * Update messaging when no reports/scripts exist * Catch ImportErrors when rendering report/script lists * Fix loading of nested modules * Fix URLs for nested scripts/reports
This commit is contained in:
@@ -195,8 +195,6 @@ class Report(object):
|
||||
Run the report and save its results. Each test method will be executed in order.
|
||||
"""
|
||||
self.logger.info(f"Running report")
|
||||
job.status = JobStatusChoices.STATUS_RUNNING
|
||||
job.save()
|
||||
|
||||
# Perform any post-run tasks
|
||||
self.pre_run()
|
||||
@@ -218,6 +216,7 @@ class Report(object):
|
||||
logger.error(f"Exception raised during report execution: {e}")
|
||||
job.terminate(status=JobStatusChoices.STATUS_ERRORED)
|
||||
finally:
|
||||
job.data = self._results
|
||||
job.terminate()
|
||||
|
||||
# Perform any post-run tasks
|
||||
|
Reference in New Issue
Block a user