Flagsmith / Flagsmith/flagsmith

Restrict deletion of features other features depend on

Open
#8,415 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
6.6k
Forks
567
Avg merge
1d 13h
Merged PRs (30d)
121

Description

Add dependency validation to `DELETE /api/v1/projects/{project_pk}/features/{id}/`.

### Acceptance criteria

- Deleting (not archiving) a feature is rejected with a 400 while any `SegmentFlagReference` row points at it.
- Removing the last reference allows deletion to proceed.

Contributor guide

Open the contributing guide

Research direction

Start at the DELETE /api/v1/projects/{project_pk}/features/{id}/ endpoint and trace how feature deletion differs from archiving. Inspect the SegmentFlagReference relationship and add coverage for rejection while references exist and successful deletion after the last reference is removed; done means the stated 400 behavior and deletion behavior are verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend, databases
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.