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

Method with_context

api/environments/identities/managers.py:33–52  ·  view source on GitHub ↗
(
        self,
        integrations: "Iterable[IntegrationConfig] | None" = None,
        extra_select_related: "Iterable[str] | None" = None,
        extra_prefetch_related: "Iterable[str | Prefetch] | None" = None,  # type: ignore[type-arg]
    )

Source from the content-addressed store, hash-verified

31 )
32
33 def with_context(
34 self,
35 integrations: "Iterable[IntegrationConfig] | None" = None,
36 extra_select_related: "Iterable[str] | None" = None,
37 extra_prefetch_related: "Iterable[str | Prefetch] | None" = None, # type: ignore[type-arg]
38 ) -> "QuerySet[Identity]":
39 from integrations.integration import IDENTITY_INTEGRATIONS
40
41 return self.select_related(
42 "environment",
43 "environment__project",
44 *(
45 f"environment__{integration['relation_name']}"
46 for integration in (integrations or IDENTITY_INTEGRATIONS)
47 ),
48 *(extra_select_related or []),
49 ).prefetch_related(
50 "identity_traits",
51 *(extra_prefetch_related or []),
52 )

Callers 4

get_or_create_for_sdkMethod · 0.95
getMethod · 0.80
getMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected