mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-25 21:36:52 +08:00
Fix SQLAlchemy result handling in get_sandbox_by_session_api_key (#12148)
Co-authored-by: openhands <openhands@all-hands.dev>
This commit is contained in:
parent
8bc1a47a78
commit
dc99c7b62e
@ -356,7 +356,7 @@ class RemoteSandboxService(SandboxService):
|
||||
StoredRemoteSandbox.id == runtime.get('session_id')
|
||||
)
|
||||
result = await self.db_session.execute(query)
|
||||
sandbox = result.first()
|
||||
sandbox = result.scalar_one_or_none()
|
||||
if sandbox is None:
|
||||
raise ValueError('sandbox_not_found')
|
||||
return self._to_sandbox_info(sandbox, runtime)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user