We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 39341df commit 02d9c7cCopy full SHA for 02d9c7c
models/user/avatar.go
@@ -62,7 +62,7 @@ func GenerateRandomAvatar(ctx context.Context, u *User) error {
62
63
// AvatarLinkWithSize returns a link to the user's avatar with size. size <= 0 means default size
64
func (u *User) AvatarLinkWithSize(ctx context.Context, size int) string {
65
- if u.IsGhost() {
+ if u.IsGhost() || u.ID <= 0 {
66
return avatars.DefaultAvatarLink()
67
}
68
0 commit comments