This commit is contained in:
Andrey Nering 2016-12-06 20:17:25 -02:00
parent 8a3c856b1c
commit 679d91afdf
1 changed files with 2 additions and 2 deletions

View File

@ -86,7 +86,7 @@ func CreateOrUpdateIssueNotifications(issue *Issue) error {
defer sess.Close() defer sess.Close()
for _, watch := range watches { for _, watch := range watches {
exists, err := issueNotificationExists(sess, watch.UserID, watch.RepoID) exists, err := issueNotificationExists(sess, watch.UserID, issue.ID)
if err != nil { if err != nil {
return err return err
} }
@ -146,7 +146,7 @@ func updateIssueNotification(e Engine, userID, issueID int64) error {
func getIssueNotification(e Engine, userID, issueID int64) (*Notification, error) { func getIssueNotification(e Engine, userID, issueID int64) (*Notification, error) {
notification := new(Notification) notification := new(Notification)
_, err := e. _, err := e.
Where("user_id = ?"). Where("user_id = ?", userID).
And("issue_id = ?", issueID). And("issue_id = ?", issueID).
Get(notification) Get(notification)
return notification, err return notification, err