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

Find Flags enabled=false returning Enabled Flags #342

Closed
fenriskiba opened this issue Apr 3, 2020 · 1 comment · Fixed by #343
Closed

Find Flags enabled=false returning Enabled Flags #342

fenriskiba opened this issue Apr 3, 2020 · 1 comment · Fixed by #343

Comments

@fenriskiba
Copy link
Contributor

fenriskiba commented Apr 3, 2020

For some reason, when calling /api/v1/flags/?enabled=false Flags that are enabled are being returned.

Setting enabled=true works as expected, but false seems to be off.

Expected Behavior

Calling the Find Flags API with enabled=false in the query string should only return flags that are disabled.

Current Behavior

Calling the Find Flags API with enabled=false in the query string returns all flags.

Your Environment

Flagr v1.1.7 hosted in Red Hat OpenShift (though I also found the same issue in local docker).

@zhouzhuojie
Copy link
Collaborator

Thanks for the bug report, my first guess is that gorm didn't send "zero" values with the actual query run in the database.

https://github.com/checkr/flagr/blob/916baf2707db8feb0704ab606b31e978e2387b93/pkg/handler/crud.go#L77-L79

Will work on a fix soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants