From 6ecd2e782f850fe4f27d32bf4b69137f07a8f254 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Tue, 16 May 2023 02:30:21 +0800 Subject: [PATCH] Fix Pull Mirror out-of-sync bugs (#24732) (#24733) Backport #24732 Bug-fix only --- templates/repo/header.tmpl | 2 +- templates/repo/settings/options.tmpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl index beea89399e..4e92532bde 100644 --- a/templates/repo/header.tmpl +++ b/templates/repo/header.tmpl @@ -39,7 +39,7 @@ {{end}} - {{if $.IsPullMirror}} + {{if and $.IsPullMirror $.Mirror}} {{$address := MirrorRemoteAddress $.Context . $.Mirror.GetRemoteName false}}
{{$.locale.Tr "repo.mirror_from"}} {{$address.Address}}
{{end}} diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl index 0a64492d36..e205b9330d 100644 --- a/templates/repo/settings/options.tmpl +++ b/templates/repo/settings/options.tmpl @@ -88,7 +88,7 @@ {{end}} - {{if .Repository.IsMirror}} + {{if and .Repository.IsMirror .Mirror}} {{(MirrorRemoteAddress $.Context .Repository .Mirror.GetRemoteName false).Address}}