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

Method perform_create

api/organisations/invites/views.py:165–178  ·  view source on GitHub ↗
(self, serializer)

Source from the content-addressed store, hash-verified

163 return Response(status=status.HTTP_200_OK)
164
165 def perform_create(self, serializer): # type: ignore[no-untyped-def]
166 organisation = Organisation.objects.get(id=self.kwargs.get("organisation_pk"))
167 subscription_metadata = organisation.subscription.get_subscription_metadata()
168
169 if (
170 organisation.num_seats >= subscription_metadata.seats
171 and not organisation.subscription.can_auto_upgrade_seats
172 ):
173 raise SubscriptionDoesNotSupportSeatUpgrade()
174
175 serializer.save(
176 organisation_id=self.kwargs.get("organisation_pk"),
177 invited_by=self.request.user,
178 )

Callers

nothing calls this directly

Calls 4

getMethod · 0.45
saveMethod · 0.45

Tested by

no test coverage detected