added error check for dependency exists function
Signed-off-by: Konrad <konrad@kola-entertainments.de>
This commit is contained in:
parent
0eaf0404cc
commit
1f8ce67366
|
|
@ -127,12 +127,20 @@ func issueDepExists(e Engine, issueID int64, depID int64) (exists bool, err erro
|
||||||
|
|
||||||
exists, err = e.Get(&Dependencies)
|
exists, err = e.Get(&Dependencies)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return exists, err
|
||||||
|
}
|
||||||
|
|
||||||
// Check for dependencies the other way around
|
// Check for dependencies the other way around
|
||||||
// Otherwise two issues could block each other which would result in none of them could be closed.
|
// Otherwise two issues could block each other which would result in none of them could be closed.
|
||||||
if !exists {
|
if !exists {
|
||||||
Dependencies.IssueID = depID
|
Dependencies.IssueID = depID
|
||||||
Dependencies.DependencyID = issueID
|
Dependencies.DependencyID = issueID
|
||||||
exists, err = e.Get(&Dependencies)
|
exists, err = e.Get(&Dependencies)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return exists, err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user