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

Method get_role

api/organisations/serializers.py:70–73  ·  view source on GitHub ↗
(self, instance)

Source from the content-addressed store, hash-verified

68
69 @extend_schema_field({"type": "string", "nullable": True})
70 def get_role(self, instance): # type: ignore[no-untyped-def]
71 if self.context.get("request"):
72 user = self.context["request"].user
73 return user.get_organisation_role(instance)
74
75
76class OrganisationSerializerBasic(serializers.ModelSerializer): # type: ignore[type-arg]

Callers

nothing calls this directly

Calls 2

getMethod · 0.45
get_organisation_roleMethod · 0.45

Tested by

no test coverage detected