From f1b78f3cdd5ae23fd679c9c1a85f4f1e85e92857 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Wed, 9 Jul 2025 06:49:30 +0800 Subject: [PATCH] Fix bug when displaying git user avatar in commits list (#35003) A quick fix for #34991 `ValidateCommitsWithEmails` will create a fake user for a git commit user with a related Gitea user. The UI should not display a link for such users. --- templates/repo/commits_list.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/repo/commits_list.tmpl b/templates/repo/commits_list.tmpl index 959f2a93985..9dae6594b9d 100644 --- a/templates/repo/commits_list.tmpl +++ b/templates/repo/commits_list.tmpl @@ -16,7 +16,7 @@
{{$userName := .Author.Name}} - {{if .User}} + {{if and .User (gt .User.ID 0)}} /* User with id == 0 is a fake user from git author */ {{if and .User.FullName DefaultShowFullName}} {{$userName = .User.FullName}} {{end}}