We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0dfd025 commit ce13b3cCopy full SHA for ce13b3c
flag_engine/context/mappers.py
@@ -152,7 +152,10 @@ def map_feature_states_to_feature_contexts(
152
)
153
]
154
if feature_segment := feature_state.feature_segment:
155
- feature_ctx_data["priority"] = feature_segment.priority
+ # If for some reason the feature segment priority is not set,
156
+ # default to lowest possible priority
157
+ priority = feature_segment.priority or float("inf")
158
+ feature_ctx_data["priority"] = priority
159
features[feature_state.feature.name] = feature_ctx_data
160
return features
161
0 commit comments