Skip to content

Commit f48771a

Browse files
authored
Fix template bug of LFS lock (#18784)
1 parent 616146f commit f48771a

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

routers/web/repo/view.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,7 @@ func renderFile(ctx *context.Context, entry *git.TreeEntry, treeLink, rawLink st
464464
return
465465
}
466466
ctx.Data["LFSLockOwner"] = u.DisplayName()
467+
ctx.Data["LFSLockOwnerHomeLink"] = u.HomeLink()
467468
ctx.Data["LFSLockHint"] = ctx.Tr("repo.editor.this_file_locked")
468469
}
469470

templates/repo/view_file.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
{{if .LFSLock}}
2525
<div class="file-info-entry ui tooltip" data-content="{{.LFSLockHint}}">
2626
{{svg "octicon-lock" 16 "mr-2"}}
27-
<a href="{{.LFSLock.Owner.HomeLink}}">{{.LFSLockOwner}}</a>
27+
<a href="{{.LFSLockOwnerHomeLink}}">{{.LFSLockOwner}}</a>
2828
</div>
2929
{{end}}
3030
</div>

0 commit comments

Comments
 (0)