From 4a9f451c0ed59b32735e0d3ddff97484e0f63d64 Mon Sep 17 00:00:00 2001 From: Shekar Siri Date: Thu, 6 Jul 2023 17:28:08 +0200 Subject: [PATCH] fix(api): feature flag edit error --- api/chalicelib/core/feature_flags.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api/chalicelib/core/feature_flags.py b/api/chalicelib/core/feature_flags.py index f044191d9..7fffb67b6 100644 --- a/api/chalicelib/core/feature_flags.py +++ b/api/chalicelib/core/feature_flags.py @@ -297,7 +297,9 @@ def create_conditions(feature_flag_id: int, conditions: List[schemas.FeatureFlag """ with pg_client.PostgresClient() as cur: - params = [(feature_flag_id, c.name, c.rollout_percentage, json.dumps(c.filters)) for c in conditions] + params = [ + (feature_flag_id, c.name, c.rollout_percentage, json.dumps([filter_.dict() for filter_ in c.filters])) + for c in conditions] query = cur.mogrify(sql, params) cur.execute(query) rows = cur.fetchall()