Flagsmith / Flagsmith/flagsmith
Inconsistent empty feature values when creating or editing
- Dominant language
- Python
- Stars
- 6.6k
- Forks
- 567
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 121
Description
### How are you running Flagsmith
- [ ] Self Hosted with Docker
- [ ] Self Hosted with Kubernetes
- [X] SaaS at flagsmith.com
- [ ] Some other way (add details in description below)
### Describe the bug
When a feature is created without a value, its value is set to `null`. However, if its value is set to non-empty and later set back to empty, the resulting value will be set to `""`. Setting the feature to have a value of `null` requires a manual API call.
### Steps To Reproduce
1. Create a feature without a value
2. Click "Run test" in the Features list - that feature will have a value of `null`
3. Edit the feature to have some other value
4. Edit the feature again and delete its value
5. Click "Run test" again - the feature will now have a value of `""`
### Expected behavior
Erasing a feature's value should return it to the exact same state as when it was created without a value. Because we're not making the type choice explicit in the UI, IMO the correct solution would be to always save empty features as `null`.
### Screenshots
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.