mirror of
https://github.com/langgenius/dify.git
synced 2026-04-05 18:31:45 +08:00
fix: use default_factory for callable defaults in ORM dataclasses (#28730)
This commit is contained in:
@@ -1103,7 +1103,9 @@ class WorkflowAppLog(TypeBase):
|
||||
sa.Index("workflow_app_log_workflow_run_id_idx", "workflow_run_id"),
|
||||
)
|
||||
|
||||
id: Mapped[str] = mapped_column(StringUUID, default=lambda: str(uuid4()), init=False)
|
||||
id: Mapped[str] = mapped_column(
|
||||
StringUUID, insert_default=lambda: str(uuid4()), default_factory=lambda: str(uuid4()), init=False
|
||||
)
|
||||
tenant_id: Mapped[str] = mapped_column(StringUUID)
|
||||
app_id: Mapped[str] = mapped_column(StringUUID)
|
||||
workflow_id: Mapped[str] = mapped_column(StringUUID, nullable=False)
|
||||
|
||||
Reference in New Issue
Block a user