Skip to content

Commit 03721b3

Browse files
committed
distinguish trait absence from falsy trait values
1 parent f2f7c25 commit 03721b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

flag_engine/segments/evaluator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ def _get_context_value_getter(
379379
return partial(_get_trait_value, trait_key=property)
380380

381381
def getter(context: EvaluationContext) -> ContextValue:
382-
if trait_value := _get_trait_value(context, property):
382+
if trait_value := _get_trait_value(context, property) is not None:
383383
return trait_value
384384
if typing.TYPE_CHECKING: # pragma: no cover
385385
# Ugly hack to satisfy mypy :(

0 commit comments

Comments
 (0)