Skip to content

Commit fce9ccd

Browse files
ImTotemclaude
andcommitted
fix(authz): use grpc.Future isinstance check for async resolution
getattr approach didn't work — UnaryUnaryCall doesn't expose result via getattr. Use isinstance(call, grpc.Future) instead. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent d677c11 commit fce9ccd

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/bcsd_api/authz/client.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,10 @@ def _update(operation, res_type: str, res_id: str, relation: str, user_id: str)
4040

4141

4242
def _resolve(call):
43-
resolve = getattr(call, "result", None)
44-
if resolve:
45-
return resolve()
43+
from grpc import Future
44+
45+
if isinstance(call, Future):
46+
return call.result()
4647
return call
4748

4849

0 commit comments

Comments
 (0)