Skip to content

Audit log generates "segment created" event when editing an existing segment #6727

@adamvialpando

Description

@adamvialpando

How are you running Flagsmith

  • Self Hosted with Docker
  • Self Hosted with Kubernetes
  • 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"
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions