return a question mark as category if formdef is no longer available (#13956)

This commit is contained in:
Frédéric Péters 2016-11-14 12:16:17 +01:00
parent 27dc0bd814
commit cf0ae530a4
1 changed files with 4 additions and 1 deletions

View File

@ -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):