* adds minor __str__() improvement
* adds/updates translations
This commit is contained in:
mipel
2021-10-13 08:50:26 +02:00
parent 86ed11c907
commit 8dfd99babe
3 changed files with 114 additions and 106 deletions

View File

@@ -53,8 +53,9 @@ class KonovaCode(models.Model):
if self.parent:
ret_val += self.parent.long_name + " > "
ret_val += self.long_name
if self.short_name:
ret_val += " ({})".format(self.short_name)
if self.short_name and self.short_name != self.long_name:
# Only add short name, if we won't have stupid repition like 'thing a (thing a)' due to misused long-short names
ret_val += f" ({self.short_name})"
return ret_val
@property