Moved error check before range
Signed-off-by: Konrad <konrad@kola-entertainments.de>
This commit is contained in:
parent
e58f703b08
commit
837c917798
|
|
@ -139,6 +139,10 @@ func IssueNoDependenciesLeft(issue *Issue) bool {
|
|||
var issueDeps []IssueDependencyIssue
|
||||
|
||||
err := x.Join("INNER", "issue", "issue.id = issue_dependency.issue_id").Find(&issueDeps)
|
||||
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
|
||||
for _, issueDep := range issueDeps {
|
||||
if !issueDep.IsClosed {
|
||||
|
|
@ -146,9 +150,5 @@ func IssueNoDependenciesLeft(issue *Issue) bool {
|
|||
}
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user