Skip to content

Commit ca12b73

Browse files
committed
Add __str__ method to LocalUnit model
1 parent ea93947 commit ca12b73

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

local_units/models.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,8 @@ class LocalUnit(models.Model):
105105
verbose_name=_('Social link')
106106
)
107107
location = models.PointField()
108+
109+
def __str__(self):
110+
branch_name = self.local_branch_name or self.english_branch_name
111+
return f'{branch_name} ({self.country.name})'
112+

0 commit comments

Comments
 (0)