diff options
author | Matthew Lemon <lemon@matthewlemon.com> | 2020-09-11 11:04:51 +0100 |
---|---|---|
committer | Matthew Lemon <lemon@matthewlemon.com> | 2020-09-11 11:04:51 +0100 |
commit | 5f9f280f177a4154366b6b28f9c87a9b9f4851d7 (patch) | |
tree | b449e5e45a2d53823ce750f284ca217439a4f108 /ctrack/caf | |
parent | 97516ced1a3907a1809d2c90c51db0764f37c317 (diff) |
can delete systems and re-add them with convoluted admin procedure
Diffstat (limited to 'ctrack/caf')
-rw-r--r-- | ctrack/caf/admin.py | 5 |
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" |