MCPcopy Create free account
hub / github.com/Flagsmith/flagsmith / export_featurestate_value

Function export_featurestate_value

api/edge_api/identities/export.py:181–198  ·  view source on GitHub ↗
(
    featurestate_value: typing.Any, featurestate_uuid: str
)

Source from the content-addressed store, hash-verified

179
180
181def export_featurestate_value(
182 featurestate_value: typing.Any, featurestate_uuid: str
183) -> dict: # type: ignore[type-arg]
184 if isinstance(featurestate_value, Decimal):
185 if featurestate_value.as_tuple().exponent == 0:
186 featurestate_value = int(featurestate_value)
187
188 fsv_data = FeatureState().generate_feature_state_value_data(featurestate_value) # type: ignore[no-untyped-call]
189 fsv_data.pop("feature_state")
190
191 return {
192 "model": "features.featurestatevalue",
193 "fields": {
194 "uuid": uuid.uuid4(),
195 "feature_state": [featurestate_uuid],
196 **fsv_data,
197 },
198 }
199
200
201def export_mv_featurestate_value(

Callers 1

Calls 2

FeatureStateClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…