mirror of
https://github.com/OpenHands/OpenHands.git
synced 2026-03-22 05:37:20 +08:00
fix: add default uuid4 to event_callback_result primary key (#12908)
Co-authored-by: openhands <openhands@all-hands.dev>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user