We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c58dc38 commit 9979c4aCopy full SHA for 9979c4a
flag_engine/segments/evaluator.py
@@ -216,8 +216,12 @@ def context_matches_condition(
216
if condition["operator"] == constants.PERCENTAGE_SPLIT:
217
if context_value is not None:
218
object_ids = [segment_key, context_value]
219
+ elif identity_key := (
220
+ (identity_context := context.get("identity")) and identity_context["key"]
221
+ ):
222
+ object_ids = [segment_key, identity_key]
223
else:
- object_ids = [segment_key, get_context_value(context, "$.identity.key")]
224
+ return False
225
226
float_value = float(condition["value"])
227
return get_hashed_percentage_for_object_ids(object_ids) <= float_value
0 commit comments