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

Class _EnvironmentScopedMetricField

api/experimentation/serializers.py:207–212  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

205
206
207class _EnvironmentScopedMetricField(serializers.PrimaryKeyRelatedField[Metric]):
208 def get_queryset(self) -> QuerySet[Metric]:
209 queryset: QuerySet[Metric] = Metric.objects.filter(
210 environment=self.context["environment"]
211 )
212 return queryset
213
214
215class ExperimentMetricInlineSerializer(serializers.Serializer): # type: ignore[type-arg]

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…