Fix Member.display_name returning None
If Member.nick was None, getattr would happily return None, not the default value.
This commit is contained in:
parent
7f09acf871
commit
29b01f20ba
@ -133,5 +133,5 @@ class User:
|
|||||||
if they have a server specific nickname then that
|
if they have a server specific nickname then that
|
||||||
is returned instead.
|
is returned instead.
|
||||||
"""
|
"""
|
||||||
return getattr(self, 'nick', self.name)
|
return getattr(self, 'nick', None) or self.name
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user