Fix bug in Issue.GetIsRead (#876)

tokarchuk/v1.17
Ethan Koenig 8 years ago committed by Lunny Xiao
parent e4031b822a
commit e6b4448ba3
  1. 3
      models/issue.go

@ -193,7 +193,8 @@ func (issue *Issue) GetIsRead(userID int64) error {
if has, err := x.Get(issueUser); err != nil { if has, err := x.Get(issueUser); err != nil {
return err return err
} else if !has { } else if !has {
return ErrUserNotExist{UID: userID} issue.IsRead = false
return nil
} }
issue.IsRead = issueUser.IsRead issue.IsRead = issueUser.IsRead
return nil return nil

Loading…
Cancel
Save