aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack/caf/models.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--ctrack/caf/models.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/ctrack/caf/models.py b/ctrack/caf/models.py
index d5ae98a..5e3e2e2 100644
--- a/ctrack/caf/models.py
+++ b/ctrack/caf/models.py
@@ -4,6 +4,8 @@ from ctrack.caf.managers import ApplicableSystemManager
from ctrack.organisations.models import Organisation, Person
from django.urls.base import reverse
+from ctrack.register.models import EngagementEvent
+
class Grading(models.Model):
GRADING_TYPE = [
@@ -158,6 +160,8 @@ class CAF(models.Model):
def get_assessments(self):
return self.cafassessment_set.all()
+ def get_events(self):
+ return EngagementEvent.objects.filter(related_caf=self).all().order_by("-date")
def __str__(self):
# Get the organisation and applicable system