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

Method get_by_uuid

api/environments/views.py:171–178  ·  view source on GitHub ↗
(self, request, uuid)

Source from the content-addressed store, hash-verified

169 methods=["get"],
170 )
171 def get_by_uuid(self, request, uuid): # type: ignore[no-untyped-def]
172 qs = self.get_queryset() # type: ignore[no-untyped-call]
173 environment = get_object_or_404(qs, uuid=uuid)
174 if not request.user.has_environment_permission(VIEW_ENVIRONMENT, environment):
175 raise PermissionDenied()
176
177 serializer = self.get_serializer(environment)
178 return Response(serializer.data)
179
180 @action(detail=True, methods=["GET"], url_path="trait-keys")
181 def trait_keys(self, request, *args, **kwargs): # type: ignore[no-untyped-def]

Callers

nothing calls this directly

Calls 2

get_querysetMethod · 0.95

Tested by

no test coverage detected