Skip to content

Commit

Permalink
Fix percent condition evaluation
Browse files Browse the repository at this point in the history
  • Loading branch information
dobrovolsky authored Mar 13, 2024
1 parent e25d010 commit 8a9b9da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion featureflags_client/http/conditions.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def percent(name: str, value: Any) -> Callable:
@except_false
def proc(ctx: Dict[str, Any]) -> bool:
ctx_val = ctx.get(name, _UNDEFINED)
return ctx_val is not _UNDEFINED and hash(ctx_val) % 100 < value
return ctx_val is not _UNDEFINED and hash(ctx_val) % 100 < int(value)

return proc

Expand Down

0 comments on commit 8a9b9da

Please sign in to comment.