diff --git a/CHANGELOG.md b/CHANGELOG.md index fb2ecd8..6ed7438 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ Changes adhere to [semantic versioning](https://semver.org). * github.com/go-playground/validator/v10 v10.22.0 * gorm.io/driver/postgres v1.5.9 * gorm.io/driver/sqlite v1.5.6 +* Fixed filter for Updates ignoring desired state ## [3.0.1] - 2024/06/10 diff --git a/server/repository_update.go b/server/repository_update.go index 8c7fcfe..cf6289d 100644 --- a/server/repository_update.go +++ b/server/repository_update.go @@ -232,7 +232,7 @@ func (r *updateDbRepo) paginate(page int, pageSize int, orderBy string, order st } states := make([]string, 0, len(state)) - if len(states) > 0 { + if len(state) > 0 { for _, s := range state { states = append(states, s.Value()) } @@ -249,7 +249,7 @@ func (r *updateDbRepo) count(searchTerm string, searchIn string, state ...api.Up var c int64 states := make([]string, 0, len(state)) - if len(states) > 0 { + if len(state) > 0 { for _, s := range state { states = append(states, s.Value()) }