Skip to content

Commit df130a6

Browse files
committed
fix(flagd): skip handling 'None'
Signed-off-by: AdityaVallabh <[email protected]>
1 parent 5137690 commit df130a6

File tree

2 files changed

+2
-3
lines changed
  • providers/openfeature-provider-flagd/src/openfeature/contrib/provider/flagd/resolvers

2 files changed

+2
-3
lines changed

providers/openfeature-provider-flagd/src/openfeature/contrib/provider/flagd/resolvers/in_process.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ def _resolve(
121121
)
122122

123123
variant, value = flag.get_variant(variant)
124+
if value is None:
125+
raise ParseError(f"Resolved variant {variant} not in variants config.")
124126

125127
return FlagResolutionDetails(
126128
value,

providers/openfeature-provider-flagd/src/openfeature/contrib/provider/flagd/resolvers/process/flags.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,4 @@ def get_variant(
9090
if isinstance(variant_key, bool):
9191
variant_key = str(variant_key).lower()
9292

93-
if variant_key not in self.variants:
94-
raise ParseError(f"Resolved variant {variant_key} not in variants config.")
95-
9693
return variant_key, self.variants.get(variant_key)

0 commit comments

Comments
 (0)