Skip to content

Commit ce13b3c

Browse files
committed
typing
1 parent 0dfd025 commit ce13b3c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

flag_engine/context/mappers.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,10 @@ def map_feature_states_to_feature_contexts(
152152
)
153153
]
154154
if feature_segment := feature_state.feature_segment:
155-
feature_ctx_data["priority"] = feature_segment.priority
155+
# 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
156159
features[feature_state.feature.name] = feature_ctx_data
157160
return features
158161

0 commit comments

Comments
 (0)