fix err returning
This commit is contained in:
parent
0334927da0
commit
308d613427
@ -103,10 +103,16 @@ func CreateOrStopIssueStopwatch(user *User, issue *Issue) error {
|
|||||||
} else {
|
} else {
|
||||||
//if another stopwatch is running: stop it
|
//if another stopwatch is running: stop it
|
||||||
exists, sw, err := HasUserStopwatch(user.ID)
|
exists, sw, err := HasUserStopwatch(user.ID)
|
||||||
if exists && err==nil {
|
if err != nil {
|
||||||
issue, err := getIssueByID(x, sw.IssueID)
|
return err
|
||||||
if err == nil {
|
}
|
||||||
CreateOrStopIssueStopwatch(user, issue)
|
if exists {
|
||||||
|
issue, err := getIssueByID(x, sw.IssueID)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if err := CreateOrStopIssueStopwatch(user, issue) ; err != nil {
|
||||||
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user