@@ -159,7 +159,7 @@ def set_forced_decision(self, decision_context, decision):
159
159
Returns:
160
160
True if the forced decision has been set successfully.
161
161
"""
162
- if not self .client or not self .client .config_manager .get_config ():
162
+ if not self .client . is_valid or not self .client .config_manager .get_config ():
163
163
self .log .logger .error (OptimizelyDecisionMessage .SDK_NOT_READY )
164
164
return False
165
165
@@ -178,7 +178,7 @@ def get_forced_decision(self, decision_context):
178
178
Returns:
179
179
A forced_decision or None if forced decisions are not set for the parameters.
180
180
"""
181
- if not self .client or not self .client .config_manager .get_config ():
181
+ if not self .client . is_valid or not self .client .config_manager .get_config ():
182
182
self .log .logger .error (OptimizelyDecisionMessage .SDK_NOT_READY )
183
183
return None
184
184
@@ -196,7 +196,7 @@ def remove_forced_decision(self, decision_context):
196
196
Returns:
197
197
Returns: true if the forced decision has been removed successfully.
198
198
"""
199
- if not self .client or not self .client .config_manager .get_config ():
199
+ if not self .client . is_valid or not self .client .config_manager .get_config ():
200
200
self .log .logger .error (OptimizelyDecisionMessage .SDK_NOT_READY )
201
201
return False
202
202
@@ -214,7 +214,7 @@ def remove_all_forced_decisions(self):
214
214
Returns:
215
215
True if forced decisions have been removed successfully.
216
216
"""
217
- if not self .client .config_manager .get_config ():
217
+ if not self .client .is_valid or not self . client . config_manager .get_config ():
218
218
self .log .logger .error (OptimizelyDecisionMessage .SDK_NOT_READY )
219
219
return False
220
220
0 commit comments