We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 13904f6 commit 8f10c42Copy full SHA for 8f10c42
flagsmith/flagsmith.py
@@ -334,10 +334,14 @@ def _get_environment_flags_from_document(self) -> Flags:
334
335
# Omit segments from evaluation context for environment flags
336
# as they are only relevant for identity-specific evaluations
337
- context_without_segments: SDKEvaluationContext = {
338
- "environment": self._evaluation_context["environment"],
339
- "features": self._evaluation_context.get("features", {}),
340
- }
+ context_without_segments = typing.cast(
+ SDKEvaluationContext,
+ {
+ key: value
341
+ for key, value in self._evaluation_context.items()
342
+ if key != "segments"
343
+ },
344
+ )
345
346
evaluation_result = engine.get_evaluation_result(context_without_segments)
347
0 commit comments