Skip to content

Commit

Permalink
Fix viewing user subscriptions (#21482)
Browse files Browse the repository at this point in the history
Fix enumeration of user subscriptions. `watch.mode` is not a boolean but
a smallint.

Fixes #21447
Regression of #17156
  • Loading branch information
zenofile authored Oct 18, 2022
1 parent 716fcfc commit 20a5452
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion models/issues/issue.go
Original file line number Diff line number Diff line change
Expand Up @@ -1496,7 +1496,8 @@ func applySubscribedCondition(sess *xorm.Session, subscriberID int64) *xorm.Sess
builder.In("issue.repo_id", builder.
Select("id").
From("watch").
Where(builder.Eq{"user_id": subscriberID, "mode": true}),
Where(builder.And(builder.Eq{"user_id": subscriberID},
builder.In("mode", repo_model.WatchModeNormal, repo_model.WatchModeAuto))),
),
),
)
Expand Down

0 comments on commit 20a5452

Please sign in to comment.