Skip to content

Commit f9f0635

Browse files
author
Pijush Chakraborty
committed
Changes for percent comparison
1 parent e377491 commit f9f0635

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

firebase_admin/remote_config.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -421,11 +421,11 @@ def evaluate_percent_condition(self, percent_condition,
421421

422422
hash64 = self.hash_seeded_randomization_id(string_to_hash)
423423
instance_micro_percentile = hash64 % (100 * 1000000)
424-
if percent_operator == PercentConditionOperator.LESS_OR_EQUAL:
424+
if percent_operator == PercentConditionOperator.LESS_OR_EQUAL.value:
425425
return instance_micro_percentile <= norm_micro_percent
426-
if percent_operator == PercentConditionOperator.GREATER_THAN:
426+
if percent_operator == PercentConditionOperator.GREATER_THAN.value:
427427
return instance_micro_percentile > norm_micro_percent
428-
if percent_operator == PercentConditionOperator.BETWEEN:
428+
if percent_operator == PercentConditionOperator.BETWEEN.value:
429429
return norm_percent_lower_bound < instance_micro_percentile <= norm_percent_upper_bound
430430
logger.warning("Unknown percent operator: %s", percent_operator)
431431
return False

0 commit comments

Comments
 (0)