Skip to content

Commit 4b46c98

Browse files
committed
Add __str__ method to LocalUnitType model
1 parent ca12b73 commit 4b46c98

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

local_units/models.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ class LocalUnitType(models.Model):
1818
verbose_name=_('Name')
1919
)
2020

21+
def __str__(self):
22+
return f'{self.name} ({self.level})'
23+
2124

2225
class LocalUnit(models.Model):
2326
country = models.ForeignKey(

0 commit comments

Comments
 (0)