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

Method invite

api/organisations/views.py:156–162  ·  view source on GitHub ↗
(self, request, pk)

Source from the content-addressed store, hash-verified

154
155 @action(detail=True, methods=["POST"])
156 def invite(self, request, pk): # type: ignore[no-untyped-def]
157 serializer = self.get_serializer(data=request.data)
158 serializer.is_valid(raise_exception=True)
159 serializer.save()
160 # serializer returns a dictionary containing the list of serialized invite objects since it's a single
161 # serializer generating multiple instances.
162 return Response(serializer.data.get("invites"), status=status.HTTP_201_CREATED)
163
164 @action(detail=True, methods=["POST"], url_path="remove-users")
165 def remove_users(self, request, pk): # type: ignore[no-untyped-def]

Callers

nothing calls this directly

Calls 3

is_validMethod · 0.80
saveMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected