Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix reversal of open/closed group listing filter #989

Merged
merged 1 commit into from
Feb 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ The format is based on [keep a changelog](http://keepachangelog.com) and this pr
## [Unreleased]
### Added
- Add tournament record delete runtime functions and API.

### Changed
- Improve graceful shutdown of Google IAP receipt processor.

### Fixed
- Consistent validation of override operator in runtime leaderboard record writes.
- Correctly filter open/closed groups in the listing API.

## [3.15.0] - 2023-01-04
### Added
Expand Down
8 changes: 4 additions & 4 deletions server/core_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -1751,7 +1751,7 @@ WHERE name ILIKE $2`
case open != nil && langTag != "" && edgeCount > -1:
// Filtering by open/closed, lang tag, and edge count
state := 0
if *open {
if !*open {
state = 1
}
params = append(params, state, langTag, edgeCount)
Expand All @@ -1770,7 +1770,7 @@ AND edge_count <= $4`
case open != nil && langTag != "":
// Filtering by open/closed and lang tag.
state := 0
if *open {
if !*open {
state = 1
}
params = append(params, state, langTag)
Expand All @@ -1787,7 +1787,7 @@ AND lang_tag = $3`
case open != nil && edgeCount > -1:
// Filtering by open/closed and edge count.
state := 0
if *open {
if !*open {
state = 1
}
params = append(params, state, edgeCount)
Expand Down Expand Up @@ -1844,7 +1844,7 @@ AND edge_count <= $2`
case open != nil:
// Filtering by open/closed only.
state := 0
if *open {
if !*open {
state = 1
}
params = append(params, state)
Expand Down