Skip to content
This repository has been archived by the owner on Jan 10, 2022. It is now read-only.

Commit

Permalink
fix for filters for boolean fields
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeyglazyrindev committed Nov 20, 2021
1 parent 181a4cc commit d851e8a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/admin_list_filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func (lf *ListFilter) IsThatOptionActive(option *FieldChoice, fullURL *url.URL)
qs := fullURL.Query()
value := qs.Get(lf.URLFilteringParam)
if value != "" {
optionValue := TransformValueForListDisplay(option.Value)
optionValue := TransformValueForListDisplay(option.Value, true)
if optionValue == value {
return true
}
Expand All @@ -53,7 +53,7 @@ func (lf *ListFilter) IsThatOptionActive(option *FieldChoice, fullURL *url.URL)
func (lf *ListFilter) GetURLForOption(option *FieldChoice, fullURL *url.URL) string {
clonedURL := CloneNetURL(fullURL)
qs := clonedURL.Query()
qs.Set(lf.URLFilteringParam, TransformValueForListDisplay(option.Value))
qs.Set(lf.URLFilteringParam, TransformValueForListDisplay(option.Value, true))
clonedURL.RawQuery = qs.Encode()
return clonedURL.String()
}
Expand Down

0 comments on commit d851e8a

Please sign in to comment.