Skip to content

Commit 728267e

Browse files
[FSSDK-11547] fsc fix attempt 1
1 parent 0ae4a65 commit 728267e

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

OptimizelySDK/Bucketing/DecisionService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,7 @@ public virtual Result<FeatureDecision> GetDecisionForFlag(
759759
var userId = user.GetUserId();
760760

761761
// Check holdouts first (highest priority)
762-
var holdouts = projectConfig.GetHoldoutsForFlag(featureFlag.Key);
762+
var holdouts = projectConfig.GetHoldoutsForFlag(featureFlag.Id);
763763
foreach (var holdout in holdouts)
764764
{
765765
var holdoutDecision = GetVariationForHoldout(holdout, user, projectConfig);
@@ -945,7 +945,7 @@ ProjectConfig config
945945
var bucketedVariation = Bucketer.Bucket(config, holdout, bucketingIdResult.ResultObject, userId);
946946
reasons += bucketedVariation.DecisionReasons;
947947

948-
if (bucketedVariation.ResultObject != null)
948+
if (bucketedVariation.ResultObject != null && !string.IsNullOrEmpty(bucketedVariation.ResultObject.Key))
949949
{
950950
reasons.AddInfo($"User \"{userId}\" is bucketed into holdout variation \"{bucketedVariation.ResultObject.Key}\".");
951951
return Result<FeatureDecision>.NewResult(

OptimizelySDK/Config/DatafileProjectConfig.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -875,13 +875,13 @@ public string ToDatafile()
875875
}
876876

877877
/// <summary>
878-
/// Get holdout instances associated with the given feature flag key.
878+
/// Get holdout instances associated with the given feature flag Id.
879879
/// </summary>
880-
/// <param name="flagKey">Feature flag key</param>
880+
/// <param name="flagId">Feature flag Id</param>
881881
/// <returns>Array of holdouts associated with the flag, empty array if none</returns>
882-
public Holdout[] GetHoldoutsForFlag(string flagKey)
882+
public Holdout[] GetHoldoutsForFlag(string flagId)
883883
{
884-
var holdouts = _holdoutConfig?.GetHoldoutsForFlag(flagKey);
884+
var holdouts = _holdoutConfig?.GetHoldoutsForFlag(flagId);
885885
return holdouts?.ToArray() ?? new Holdout[0];
886886
}
887887
/// Returns the datafile corresponding to ProjectConfig

OptimizelySDK/ProjectConfig.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -321,11 +321,11 @@ public interface ProjectConfig
321321
Holdout GetHoldout(string holdoutId);
322322

323323
/// <summary>
324-
/// Get holdout instances associated with the given feature flag key.
324+
/// Get holdout instances associated with the given feature flag Id.
325325
/// </summary>
326-
/// <param name="flagKey">Feature flag key</param>
326+
/// <param name="flagKey">Feature flag Id</param>
327327
/// <returns>Array of holdouts associated with the flag, empty array if none</returns>
328-
Holdout[] GetHoldoutsForFlag(string flagKey);
328+
Holdout[] GetHoldoutsForFlag(string flagId);
329329

330330
/// <summary>
331331
/// Returns the datafile corresponding to ProjectConfig

0 commit comments

Comments
 (0)