mail: use scanner category if there's no association yet
This commit is contained in:
parent
bd0185bb6e
commit
6fced18cd1
|
@ -99,6 +99,8 @@ class Mail(models.Model):
|
|||
for association in self.associations.all():
|
||||
if association.formdef_category:
|
||||
categories[association.formdef_category] = True
|
||||
if not categories and self.scanner_category:
|
||||
categories[self.scanner_category] = True
|
||||
if not categories:
|
||||
return '-'
|
||||
return categories.keys()
|
||||
|
|
Loading…
Reference in New Issue