Skip to content

Commit 55fba0a

Browse files
committed
removing unneeded code
1 parent 4cab8aa commit 55fba0a

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

featuremanagement/_featuremanagerbase.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -239,16 +239,9 @@ def _assign_allocation(self, evaluation_event: EvaluationEvent, targeting_contex
239239
if not feature_flag:
240240
return
241241

242-
if not feature_flag.variants:
242+
if not feature_flag.variants or not feature_flag.allocation:
243243
return
244244

245-
if not feature_flag.allocation:
246-
evaluation_event.reason = (
247-
VariantAssignmentReason.DEFAULT_WHEN_ENABLED
248-
if evaluation_event.enabled
249-
else VariantAssignmentReason.DEFAULT_WHEN_DISABLED
250-
)
251-
return
252245
if not evaluation_event.enabled:
253246
FeatureManagerBase._assign_default_disabled_variant(evaluation_event)
254247
evaluation_event.variant = self._variant_name_to_variant(

0 commit comments

Comments
 (0)