Skip to content

Commit aa28cb5

Browse files
authored
Merge pull request #21 from hellohaptik/pvz_patch_1
refactor
2 parents 48aedd3 + a333909 commit aa28cb5

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

unleash-client-python/FeatureToggle/__init__.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,10 @@ def fetch_feature_toggles():
332332
expert_emails = []
333333

334334
if cas_name == FeatureToggles.__cas_name and environment == FeatureToggles.__environment:
335+
# Strip CAS and ENV name from feature name
336+
active_cas_env_name = f'{FeatureToggles.__cas_name}.'
337+
f'{FeatureToggles.__environment}.'
338+
full_feature_name = full_feature_name.replace(active_cas_env_name, '')
335339
if full_feature_name not in response:
336340
response[full_feature_name] = {}
337341
strategies = feature_toggle.get('strategies', [])
@@ -350,11 +354,6 @@ def fetch_feature_toggles():
350354

351355
# Keep updating this list for new strategies which gets added
352356

353-
# Strip CAS and ENV name from feature name
354-
active_cas_env_name = f'{FeatureToggles.__cas_name}.'
355-
f'{FeatureToggles.__environment}.'
356-
full_feature_name = full_feature_name.replace(active_cas_env_name, '')
357-
358357
# Assign the strategies data to feature name
359358
response[full_feature_name]['partner_names'] = partner_names
360359
response[full_feature_name]['business_via_names'] = business_via_names

0 commit comments

Comments
 (0)