From 516721d1ee4ac18f7a96d7dcb0198f97954fb615 Mon Sep 17 00:00:00 2001 From: Tim O'Farrell Date: Wed, 18 Feb 2026 12:57:13 +0000 Subject: [PATCH] fix: add default uuid4 to event_callback_result primary key (#12908) Co-authored-by: openhands --- .../app_server/event_callback/sql_event_callback_service.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openhands/app_server/event_callback/sql_event_callback_service.py b/openhands/app_server/event_callback/sql_event_callback_service.py index f191ab5e81..f3a71ff880 100644 --- a/openhands/app_server/event_callback/sql_event_callback_service.py +++ b/openhands/app_server/event_callback/sql_event_callback_service.py @@ -7,7 +7,7 @@ import asyncio import logging from dataclasses import dataclass from typing import AsyncGenerator -from uuid import UUID +from uuid import UUID, uuid4 from fastapi import Request from sqlalchemy import UUID as SQLUUID @@ -59,7 +59,7 @@ class StoredEventCallback(Base): # type: ignore class StoredEventCallbackResult(Base): # type: ignore __tablename__ = 'event_callback_result' - id = Column(SQLUUID, primary_key=True) + id = Column(SQLUUID, primary_key=True, default=uuid4) status = Column(Enum(EventCallbackResultStatus), nullable=True) event_callback_id = Column(SQLUUID, index=True) event_id = Column(String, index=True)