summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2016-11-14 11:16:17 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2016-11-16 11:03:33 (GMT)
commitcf0ae530a44b3aee201015b3602f91c97063f5a1 (patch)
tree54edc83be2805f6fc7b77d70b7819ebd1c97dd12
parent27dc0bd814219ad3598cf7208e83c097ef5da831 (diff)
downloadwelco-0.40.zip
welco-0.40.tar.gz
welco-0.40.tar.bz2
return a question mark as category if formdef is no longer available (#13956)v0.40
-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 9c5916b..0ed0fe7 100644
--- a/welco/qualif/models.py
+++ b/welco/qualif/models.py
@@ -52,7 +52,10 @@ class Association(models.Model):
@property
def formdef_category(self):
- return get_wcs_formdef_details(self.formdef_reference).get('category')
+ try:
+ return get_wcs_formdef_details(self.formdef_reference).get('category')
+ except AttributeError:
+ return '?'
@property
def formdata_url(self):