aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack/caf
diff options
context:
space:
mode:
authorMatthew Lemon <lemon@matthewlemon.com>2020-09-11 11:04:51 +0100
committerMatthew Lemon <lemon@matthewlemon.com>2020-09-11 11:04:51 +0100
commit5f9f280f177a4154366b6b28f9c87a9b9f4851d7 (patch)
treeb449e5e45a2d53823ce750f284ca217439a4f108 /ctrack/caf
parent97516ced1a3907a1809d2c90c51db0764f37c317 (diff)
can delete systems and re-add them with convoluted admin procedure
Diffstat (limited to 'ctrack/caf')
-rw-r--r--ctrack/caf/admin.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/ctrack/caf/admin.py b/ctrack/caf/admin.py
index f981e0f..2445125 100644
--- a/ctrack/caf/admin.py
+++ b/ctrack/caf/admin.py
@@ -12,7 +12,10 @@ from .models import (
def get_system_org(obj):
es = obj.essentialservice_set.first() # just get the first if there are many
- return es.organisation.name
+ if es: # return blank if there are none to copy with current admin template
+ return es.organisation.name
+ else:
+ return ""
get_system_org.short_description = "Organisation"