#12081: Script & report cleanup (#12091)

* 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:
Jeremy Stretch
2023-03-29 16:51:55 -04:00
committed by GitHub
parent 177668dca5
commit 715592547c
11 changed files with 130 additions and 131 deletions
+3 -1
View File
@@ -1,7 +1,6 @@
import inspect
from functools import cached_property
from django.contrib.contenttypes.fields import GenericRelation
from django.db import models
from django.urls import reverse
@@ -44,6 +43,9 @@ class ScriptModule(PythonModuleMixin, JobsMixin, ManagedFile):
def get_absolute_url(self):
return reverse('extras:script_list')
def __str__(self):
return self.python_name
@cached_property
def scripts(self):