From 73374dcbd6a9d499530187274f12c968d7b628a7 Mon Sep 17 00:00:00 2001 From: Simon Schrottner Date: Wed, 26 Jun 2024 08:19:35 +0200 Subject: [PATCH] Update providers/openfeature-provider-flagd/src/openfeature/contrib/provider/flagd/resolvers/process/custom_ops.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Anton GrĂ¼bel Signed-off-by: Simon Schrottner --- .../contrib/provider/flagd/resolvers/process/custom_ops.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/providers/openfeature-provider-flagd/src/openfeature/contrib/provider/flagd/resolvers/process/custom_ops.py b/providers/openfeature-provider-flagd/src/openfeature/contrib/provider/flagd/resolvers/process/custom_ops.py index eb2f0db..c916154 100644 --- a/providers/openfeature-provider-flagd/src/openfeature/contrib/provider/flagd/resolvers/process/custom_ops.py +++ b/providers/openfeature-provider-flagd/src/openfeature/contrib/provider/flagd/resolvers/process/custom_ops.py @@ -58,7 +58,7 @@ def fractional(data: dict, *args: JsonLogicArg) -> typing.Optional[str]: def __parse_fraction(arg: JsonLogicArg) -> typing.Optional[Fraction]: - if not isinstance(arg, (tuple, list)) or len(arg) == 0: + if not isinstance(arg, (tuple, list)) or not arg: logger.error("Fractional variant weights must be (str, int) tuple") return None