posthog
posthog copied to clipboard
fix(api): Do not return deleted web experiments for `/api/projects/:project_id/web_experiments/`
[!IMPORTANT] 👉 Stay up-to-date with PostHog coding conventions for a smoother review.
Problem
Closes #33670
Changes
I believe the router for api is using WebExperimentViewSet, and as referenced from the other view sets it seems like most are using safely_get_queryset if they want to filter/exclude.
Did you write or update any docs for this change?
- [x] No docs needed for this change
How did you test this code?
Locally:
- Create no code experiment
- Delete it
- Fire off get api request should not return me the experiment.
P.S: Is there any unit test that I need to write for this?