File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed
Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -30,14 +30,12 @@ def from_evaluation_result(
3030 cls ,
3131 flag_result : SDKFlagResult ,
3232 ) -> typing .Optional [Flag ]:
33- if (
34- flagsmith_id := (flag_result .get ("metadata" ) or {}).get ("flagsmith_id" )
35- ) is not None :
33+ if metadata := flag_result .get ("metadata" ):
3634 return Flag (
3735 enabled = flag_result ["enabled" ],
3836 value = flag_result ["value" ],
3937 feature_name = flag_result ["name" ],
40- feature_id = flagsmith_id ,
38+ feature_id = metadata [ " flagsmith_id" ] ,
4139 )
4240 return None
4341
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ class SegmentMetadata(typing.TypedDict):
4545
4646
4747class FeatureMetadata (typing .TypedDict ):
48- flagsmith_id : NotRequired [ int ]
48+ flagsmith_id : int
4949 """The ID of the feature used in Flagsmith API."""
5050
5151
You can’t perform that action at this time.
0 commit comments