diff options
Diffstat (limited to 'ctrack/caf/admin.py')
-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" |