.
This commit is contained in:
@@ -88,6 +88,13 @@ class SynMixin(object):
|
||||
else:
|
||||
return f"{self.name} [syn]"
|
||||
|
||||
def get_synonym(self):
|
||||
if self.primary:
|
||||
return "[Primary]"
|
||||
else:
|
||||
s = self.synonym.filter(primary=True)
|
||||
return ", ".join(s)
|
||||
|
||||
|
||||
class Finding(SynMixin, models.Model):
|
||||
name = models.CharField(max_length=255, unique=True)
|
||||
|
||||
Reference in New Issue
Block a user