Skip to content

Commit f1b78f3

Browse files
authored
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.
1 parent d3d357a commit f1b78f3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

templates/repo/commits_list.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<td class="author">
1717
<div class="tw-flex">
1818
{{$userName := .Author.Name}}
19-
{{if .User}}
19+
{{if and .User (gt .User.ID 0)}} /* User with id == 0 is a fake user from git author */
2020
{{if and .User.FullName DefaultShowFullName}}
2121
{{$userName = .User.FullName}}
2222
{{end}}

0 commit comments

Comments
 (0)