forked from p85947160/gitea
Fix SQLs
This commit is contained in:
parent
8a3c856b1c
commit
679d91afdf
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue