8000
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 e2ac789 commit 88352e0Copy full SHA for 88352e0
models/user/avatar.go
@@ -61,7 +61,9 @@ func GenerateRandomAvatar(ctx context.Context, u *User) error {
61
62
// AvatarLinkWithSize returns a link to the user's avatar with size. size <= 0 means default size
63
func (u *User) AvatarLinkWithSize(ctx context.Context, size int) string {
64
- if u.IsGhost() || u.IsGiteaActions() {
+ // ghost user was deleted, Gitea actions is a bot user, 0 means the user should be a virtual user
65
+ // which comes from git configure information
66
+ if u.IsGhost() || u.IsGiteaActions() || u.ID <= 0 {
67
return avatars.DefaultAvatarLink()
68
}
69
0 commit comments