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

Method validate

api/features/serializers.py:479–486  ·  view source on GitHub ↗
(self, attrs: dict[str, Any])

Source from the content-addressed store, hash-verified

477 )
478
479 def validate(self, attrs: dict[str, Any]) -> dict[str, Any]:
480 attrs = super().validate(attrs)
481 project = self.instance.project if self.instance else self.context["project"] # type: ignore[union-attr]
482 organisation = project.organisation
483 self._validate_required_metadata(
484 organisation, attrs.get("metadata", []), project=project
485 )
486 return attrs
487
488 def create(self, validated_data: dict[str, Any]) -> Feature:
489 metadata_data = validated_data.pop("metadata", [])

Callers

nothing calls this directly

Calls 3

validateMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected