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

Method generate_feature_state_value_data

api/features/models.py:706–719  ·  view source on GitHub ↗

Takes the value of a feature state to generate a feature state value and returns dictionary to use for passing into feature state value serializer :param value: feature state value of variable type :return: dictionary to pass directly into feature state value serial

(self, value)

Source from the content-addressed store, hash-verified

704 return clone
705
706 def generate_feature_state_value_data(self, value): # type: ignore[no-untyped-def]
707 """
708 Takes the value of a feature state to generate a feature state value and returns dictionary
709 to use for passing into feature state value serializer
710
711 :param value: feature state value of variable type
712 :return: dictionary to pass directly into feature state value serializer
713 """
714 fsv_type = self.get_feature_state_value_type(value)
715 return {
716 "type": fsv_type,
717 "feature_state": self.id,
718 self.get_feature_state_key_name(fsv_type): value,
719 }
720
721 def get_feature_state_value_by_hash_key(
722 self,

Callers 2

Tested by

no test coverage detected