aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack/organisations/admin.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--ctrack/organisations/admin.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/ctrack/organisations/admin.py b/ctrack/organisations/admin.py
index 203baa9..d3e6284 100644
--- a/ctrack/organisations/admin.py
+++ b/ctrack/organisations/admin.py
@@ -1,5 +1,7 @@
from django.contrib import admin
+from ctrack.caf.models import CAF
+
from .models import (
Address,
AddressType,
@@ -18,6 +20,10 @@ def get_organisation_name(person):
return Organisation.objects.filter(person__id=person.id).first().name
+def get_first_caf(org):
+ return CAF.objects.filter(organisation__id=org.id).first().version
+
+
# We need this to ensure the column header in the admin does't read the func name
get_organisation_name.short_description = "Organisation"