Flagsmith / Flagsmith/flagsmith
Audit log generates "segment created" event when editing an existing segment
- Dominant language
- Python
- Stars
- 6.6k
- Forks
- 567
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 121
Description
### How are you running Flagsmith
- [x] Self Hosted with Docker
- [x] Self Hosted with Kubernetes
- [x] SaaS at flagsmith.com
- [ ] Some other way (add details in description below)
### Describe the bug
When editing an existing segment (e.g. adding or removing a trait rule), the audit log records an incorrect "New segment created" event in addition to the expected "Segment updated" event.
Editing a segment should only produce a modification/update event.
### Steps To Reproduce
1. Create a segment
2. Edit the segment (e.g. add a trait condition)
3. Save the segment
4. Check the audit log
### Expected behavior
A single "Segment updated" event appears in the audit log.
### Screenshots
Two events appear:
1. "New segment with the same name created" (incorrect)
2. "Segment updated"
Contributor guide
Assessment
This issue has not been assessed yet.