MCPcopy Index your code
hub / github.com/Flagsmith/flagsmith / remove_organisation

Method remove_organisation

api/users/models.py:272–278  ·  view source on GitHub ↗
(self, organisation)

Source from the content-addressed store, hash-verified

270 self.permission_groups.add(*default_groups)
271
272 def remove_organisation(self, organisation): # type: ignore[no-untyped-def]
273 UserOrganisation.objects.filter(user=self, organisation=organisation).delete()
274 self.project_permissions.filter(project__organisation=organisation).delete()
275 self.environment_permissions.filter(
276 environment__project__organisation=organisation
277 ).delete()
278 self.permission_groups.remove(*organisation.permission_groups.all())
279
280 def get_organisation_role(self, organisation): # type: ignore[no-untyped-def]
281 user_organisation = self.get_user_organisation(organisation)

Calls 2

deleteMethod · 0.45
allMethod · 0.45