Merge pull request #2898 from VexiaOnline/VexiaOnline-get_numbered_name-PR

Use `self.name` instead of `self.key` as fallback in `DefaultObject.get_numbered_name`
This commit is contained in:
Griatch 2022-11-18 12:28:40 +01:00 committed by GitHub
commit e43820ae8d

View file

@ -1251,7 +1251,7 @@ class DefaultObject(ObjectDB, metaclass=TypeclassBase):
""" """
plural_category = "plural_key" plural_category = "plural_key"
key = kwargs.get("key", self.key) key = kwargs.get("key", self.name)
key = ansi.ANSIString(key) # this is needed to allow inflection of colored names key = ansi.ANSIString(key) # this is needed to allow inflection of colored names
try: try:
plural = _INFLECT.plural(key, count) plural = _INFLECT.plural(key, count)