get_display_name looker default. Resolves #2415
This commit is contained in:
parent
fa3c2aacb7
commit
28ceef6e8d
1 changed files with 2 additions and 2 deletions
|
|
@ -309,7 +309,7 @@ class DefaultObject(ObjectDB, metaclass=TypeclassBase):
|
||||||
|
|
||||||
# main methods
|
# main methods
|
||||||
|
|
||||||
def get_display_name(self, looker, **kwargs):
|
def get_display_name(self, looker=None, **kwargs):
|
||||||
"""
|
"""
|
||||||
Displays the name of the object in a viewer-aware manner.
|
Displays the name of the object in a viewer-aware manner.
|
||||||
|
|
||||||
|
|
@ -330,7 +330,7 @@ class DefaultObject(ObjectDB, metaclass=TypeclassBase):
|
||||||
builders.
|
builders.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
if self.locks.check_lockstring(looker, "perm(Builder)"):
|
if looker and self.locks.check_lockstring(looker, "perm(Builder)"):
|
||||||
return "{}(#{})".format(self.name, self.id)
|
return "{}(#{})".format(self.name, self.id)
|
||||||
return self.name
|
return self.name
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue