merge if conditions

This commit is contained in:
Lunny Xiao 2024-10-09 18:42:55 -07:00
parent 30d4010983
commit 66681c33ff
No known key found for this signature in database
GPG Key ID: C3B7C91B632F738A

View File

@ -2105,11 +2105,10 @@ func ViewIssue(ctx *context.Context) {
}
ctx.Data["DevLinks"] = devLinks
for _, link := range devLinks {
if link.LinkType == issues_model.IssueDevLinkTypePullRequest {
if !(link.PullRequest.Issue.IsClosed && !link.PullRequest.HasMerged) {
ctx.Data["MaybeFixed"] = link.PullRequest
break
}
if link.LinkType == issues_model.IssueDevLinkTypePullRequest &&
!(link.PullRequest.Issue.IsClosed && !link.PullRequest.HasMerged) {
ctx.Data["MaybeFixed"] = link.PullRequest
break
}
}
}