Skip to content

Commit 0128c92

Browse files
Merge pull request #1533 from IFRCGo/fix/other-labels-to-display-also-fine
ERU name nicely
2 parents 8493e61 + a985751 commit 0128c92

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

deployments/models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ class Meta:
104104
verbose_name_plural = _('Emergency Response Units')
105105

106106
def __str__(self):
107-
return str(self.type.label)
107+
return self.get_type_display()
108108

109109

110110
@reversion.register()
@@ -815,7 +815,7 @@ def __str__(self):
815815
name = None
816816
else:
817817
name = self.national_society
818-
return '%s (%s)' % (str(self.ERU_type.label), name)
818+
return f'{self.get_ERU_type_display()} ({name})'
819819

820820

821821
###############################################################################

0 commit comments

Comments
 (0)