Skip to content

Commit 679d91a

Browse files
committed
Fix SQLs
1 parent 8a3c856 commit 679d91a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

models/notification.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ func CreateOrUpdateIssueNotifications(issue *Issue) error {
8686
defer sess.Close()
8787

8888
for _, watch := range watches {
89-
exists, err := issueNotificationExists(sess, watch.UserID, watch.RepoID)
89+
exists, err := issueNotificationExists(sess, watch.UserID, issue.ID)
9090
if err != nil {
9191
return err
9292
}
@@ -146,7 +146,7 @@ func updateIssueNotification(e Engine, userID, issueID int64) error {
146146
func getIssueNotification(e Engine, userID, issueID int64) (*Notification, error) {
147147
notification := new(Notification)
148148
_, err := e.
149-
Where("user_id = ?").
149+
Where("user_id = ?", userID).
150150
And("issue_id = ?", issueID).
151151
Get(notification)
152152
return notification, err

0 commit comments

Comments
 (0)