Fixed lint
This commit is contained in:
parent
5852b7c9f3
commit
e1f2a8e198
|
|
@ -49,17 +49,17 @@ func AddDependency(ctx *context.Context) {
|
||||||
if dep.Index == issueIndex {
|
if dep.Index == issueIndex {
|
||||||
ctx.Flash.Error(ctx.Tr("repo.issues.dependency.add_error_same_issue"))
|
ctx.Flash.Error(ctx.Tr("repo.issues.dependency.add_error_same_issue"))
|
||||||
return
|
return
|
||||||
} else {
|
}
|
||||||
err := models.CreateIssueDependency(ctx.User, issue, dep)
|
|
||||||
if err != nil {
|
err = models.CreateIssueDependency(ctx.User, issue, dep)
|
||||||
if models.IsErrDependencyExists(err) {
|
if err != nil {
|
||||||
ctx.Flash.Error(ctx.Tr("repo.issues.dependency.add_error_dep_exists"))
|
if models.IsErrDependencyExists(err) {
|
||||||
} else if models.IsErrCircularDependency(err) {
|
ctx.Flash.Error(ctx.Tr("repo.issues.dependency.add_error_dep_exists"))
|
||||||
ctx.Flash.Error(ctx.Tr("repo.issues.dependency.add_error_cannot_create_circular"))
|
} else if models.IsErrCircularDependency(err) {
|
||||||
} else {
|
ctx.Flash.Error(ctx.Tr("repo.issues.dependency.add_error_cannot_create_circular"))
|
||||||
ctx.ServerError("CreateOrUpdateIssueDependency", err)
|
} else {
|
||||||
return
|
ctx.ServerError("CreateOrUpdateIssueDependency", err)
|
||||||
}
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user