summaryrefslogtreecommitdiffstats
path: root/welco/qualif/models.py
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2016-11-12 20:03:10 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2016-11-13 20:24:07 (GMT)
commitf45a55dc578ef6c2fff1ed07edf5f4464468e3f3 (patch)
treef404c6b58896f12b7627c59309039aa4fb954ff0 /welco/qualif/models.py
parentd06826d99f0ceb4ecc5e3b461d9c7b5ca26abd18 (diff)
downloadwelco-f45a55dc578ef6c2fff1ed07edf5f4464468e3f3.zip
welco-f45a55dc578ef6c2fff1ed07edf5f4464468e3f3.tar.gz
welco-f45a55dc578ef6c2fff1ed07edf5f4464468e3f3.tar.bz2
return a question mark as name if formdef is no longer available (#13939)
Diffstat (limited to 'welco/qualif/models.py')
-rw-r--r--welco/qualif/models.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/welco/qualif/models.py b/welco/qualif/models.py
index 829abd3..9c5916b 100644
--- a/welco/qualif/models.py
+++ b/welco/qualif/models.py
@@ -45,7 +45,10 @@ class Association(models.Model):
@property
def formdef_name(self):
- return get_wcs_formdef_details(self.formdef_reference).get('title')
+ try:
+ return get_wcs_formdef_details(self.formdef_reference).get('title')
+ except AttributeError:
+ return '?'
@property
def formdef_category(self):