:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
chore(experiments): read web-experiment variants via feature_flag.variants (#64254)
Anders233c5732726f
diff --git a/posthog/api/web_experiment.py b/posthog/api/web_experiment.pyindex a1032012bdfd..e968ec085c1e 100644--- a/posthog/api/web_experiment.py+++ b/posthog/api/web_experiment.py@@ -106,8 +106,7 @@ class WebExperimentsAPISerializer(serializers.ModelSerializer):if not obj.feature_flag:return obj.variants or {}- multivariate = obj.feature_flag.filters.get("multivariate", {})- variants_list = multivariate.get("variants", [])+ variants_list = obj.feature_flag.variants# If no feature flag variants, fall back to experiment variantsif not variants_list: