Skip to content

Commit 6ecd2e7

Browse files
authored
Fix Pull Mirror out-of-sync bugs (#24732) (#24733)
Backport #24732 Bug-fix only
1 parent 2fea93b commit 6ecd2e7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

templates/repo/header.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
{{end}}
4040
</div>
4141
</div>
42-
{{if $.IsPullMirror}}
42+
{{if and $.IsPullMirror $.Mirror}}
4343
{{$address := MirrorRemoteAddress $.Context . $.Mirror.GetRemoteName false}}
4444
<div class="fork-flag">{{$.locale.Tr "repo.mirror_from"}} <a target="_blank" rel="noopener noreferrer" href="{{$address.Address}}">{{$address.Address}}</a></div>
4545
{{end}}

templates/repo/settings/options.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
</tr>
8989
</thead>
9090
{{end}}
91-
{{if .Repository.IsMirror}}
91+
{{if and .Repository.IsMirror .Mirror}}
9292
<tbody>
9393
<tr>
9494
<td>{{(MirrorRemoteAddress $.Context .Repository .Mirror.GetRemoteName false).Address}}</td>

0 commit comments

Comments
 (0)