Optimized Issue Dependency Exists
Signed-off-by: Konrad <konrad@kola-entertainments.de>
This commit is contained in:
parent
63ce7d0f82
commit
7507e89cee
|
|
@ -117,8 +117,7 @@ func RemoveIssueDependency(user *User, issue *Issue, dep *Issue, depType Depende
|
|||
// Check if the dependency already exists
|
||||
func issueDepExists(e Engine, issueID int64, depID int64) (exists bool, err error) {
|
||||
|
||||
deps := new(IssueDependency)
|
||||
exists, err = e.Where("(issue_id = ? AND dependency_id = ?) OR (issue_id = ? AND dependency_id = ?)", issueID, depID, depID, issueID).Get(deps)
|
||||
exists, err = e.Where("(issue_id = ? AND dependency_id = ?) OR (issue_id = ? AND dependency_id = ?)", issueID, depID, depID, issueID).Exist(&IssueDependency{})
|
||||
|
||||
if err != nil {
|
||||
return exists, err
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user