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

Method save

api/app_analytics/serializers.py:160–171  ·  view source on GitHub ↗
(self, **kwargs: Any)

Source from the content-addressed store, hash-verified

158 }
159
160 def save(self, **kwargs: Any) -> None:
161 environment: Environment = kwargs["environment"]
162 cache: FeatureEvaluationCache = kwargs["cache"]
163 request = self.context["request"]
164 labels = map_request_to_labels(request)
165 for feature_name, evaluation_count in self.validated_data.items():
166 cache.track_feature_evaluation(
167 environment_id=environment.id,
168 feature_name=feature_name,
169 evaluation_count=evaluation_count,
170 labels=labels,
171 )
172
173
174def _get_label_fields() -> dict[str, serializers.Field[Any, Any, Any, Any]]:

Callers

nothing calls this directly

Calls 2

map_request_to_labelsFunction · 0.90

Tested by

no test coverage detected