.
This commit is contained in:
+4
-5
@@ -79,7 +79,7 @@ class SynMixin(object):
|
||||
# abstract = True
|
||||
|
||||
def __str__(self) -> str:
|
||||
if self.primary_name:
|
||||
if self.primary:
|
||||
if self.synonym.count() == 0:
|
||||
return self.name
|
||||
else:
|
||||
@@ -93,7 +93,7 @@ class Finding(SynMixin, models.Model):
|
||||
name = models.CharField(max_length=255, unique=True)
|
||||
synonym = models.ManyToManyField("self", blank=True)
|
||||
|
||||
primary_name = models.BooleanField(default="True")
|
||||
primary = models.BooleanField(default="True")
|
||||
|
||||
|
||||
class Condition(SynMixin, models.Model):
|
||||
@@ -101,7 +101,7 @@ class Condition(SynMixin, models.Model):
|
||||
|
||||
synonym = models.ManyToManyField("self", blank=True)
|
||||
|
||||
primary_name = models.BooleanField(default="True")
|
||||
primary = models.BooleanField(default="True")
|
||||
|
||||
subspecialty = models.ManyToManyField("subspecialty", blank=True)
|
||||
|
||||
@@ -126,8 +126,7 @@ class Structure(SynMixin, models.Model):
|
||||
|
||||
synonym = models.ManyToManyField("self", blank=True)
|
||||
|
||||
primary_name = models.BooleanField(default="True")
|
||||
|
||||
primary = models.BooleanField(default="True")
|
||||
|
||||
|
||||
@reversion.register
|
||||
|
||||
Reference in New Issue
Block a user