File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
providers/openfeature-provider-unleash/src/openfeature/contrib/provider/unleash Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -82,9 +82,18 @@ def handle_unleash_event(self, event: BaseEvent) -> None:
8282 self .emit_event (ProviderEvent .PROVIDER_READY )
8383 elif isinstance (event , UnleashFetchedEvent ):
8484 # Configuration changed when features are fetched
85+ flag_keys = []
86+ if hasattr (event , "features" ):
87+ if isinstance (event .features , dict ):
88+ flag_keys = list (event .features .keys ())
89+ elif isinstance (event .features , list ):
90+ flag_keys = [
91+ feature .get ("name" , "" )
92+ for feature in event .features
93+ if isinstance (feature , dict )
94+ ]
95+
8596 self .emit_event (
8697 ProviderEvent .PROVIDER_CONFIGURATION_CHANGED ,
87- flag_keys = (
88- list (event .features .keys ()) if hasattr (event , "features" ) else []
89- ),
98+ flag_keys = flag_keys ,
9099 )
You can’t perform that action at this time.
0 commit comments