(
featurestate_value: typing.Any, featurestate_uuid: str
)
| 179 | |
| 180 | |
| 181 | def 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 | |
| 201 | def export_mv_featurestate_value( |
no test coverage detected
searching dependent graphs…