Make identity deletion replay safe
This commit is contained in:
parent
26d0e52172
commit
12cdef5c7c
2 changed files with 14 additions and 2 deletions
|
|
@ -153,10 +153,15 @@ mutation Remove($userId: String!, $groupId: Int!) {
|
|||
return list(value["users"]), list(value["groups"])
|
||||
|
||||
def _user(self, token: str, subject: str) -> dict[str, Any] | None:
|
||||
value = self._gql(token, """
|
||||
try:
|
||||
value = self._gql(token, """
|
||||
query User($id: String!) {
|
||||
user(userId: $id) { id email displayName groups { id displayName } }
|
||||
}""", {"id": subject})
|
||||
except ValueError as exc:
|
||||
if "not found" in str(exc).lower():
|
||||
return None
|
||||
raise
|
||||
user = value.get("user")
|
||||
return dict(user) if user else None
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue