refactor(project): remove useless getattr
This commit is contained in:
@@ -118,10 +118,7 @@ class ChannelMessageBase(NotificationDetail):
|
||||
channel_type: "ChannelType",
|
||||
) -> Self:
|
||||
try:
|
||||
avatar_url = (
|
||||
getattr(user, "avatar_url", "https://lazer-data.g0v0.top/default.jpg")
|
||||
or "https://lazer-data.g0v0.top/default.jpg"
|
||||
)
|
||||
avatar_url = user.avatar_url or "https://lazer-data.g0v0.top/default.jpg"
|
||||
except Exception:
|
||||
avatar_url = "https://lazer-data.g0v0.top/default.jpg"
|
||||
instance = cls(
|
||||
|
||||
Reference in New Issue
Block a user