Skip to content

Commit 82ae3eb

Browse files
committed
for all user with id less than zero
1 parent beed81a commit 82ae3eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

models/user/avatar.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ func GenerateRandomAvatar(ctx context.Context, u *User) error {
6363
func (u *User) AvatarLinkWithSize(ctx context.Context, size int) string {
6464
// ghost user was deleted, Gitea actions is a bot user, 0 means the user should be a virtual user
6565
// which comes from git configure information
66-
if u.IsGhost() || u.IsGiteaActions() || u.ID == 0 {
66+
if u.IsGhost() || u.IsGiteaActions() || u.ID < 0 {
6767
return avatars.DefaultAvatarLink()
6868
}
6969

0 commit comments

Comments
 (0)