MCPcopy Create free account
hub / github.com/AgentOps-AI/agentops / get_by_id

Method get_by_id

app/api/agentops/opsboard/models.py:137–147  ·  view source on GitHub ↗

Get a user by ID with relationships preloaded.

(cls, orm: orm.Session, user_id: str | UUID)

Source from the content-addressed store, hash-verified

135
136 @classmethod
137 def get_by_id(cls, orm: orm.Session, user_id: str | UUID) -> Optional['UserModel']:
138 """Get a user by ID with relationships preloaded."""
139 return (
140 orm.query(cls)
141 .options(
142 joinedload(cls.orgs),
143 joinedload(cls.invites),
144 )
145 .filter(cls.id == normalize_uuid(user_id))
146 .first()
147 )
148
149
150class OrgModel(BaseModel):

Callers

nothing calls this directly

Calls 2

normalize_uuidFunction · 0.70
filterMethod · 0.45

Tested by

no test coverage detected