add more dataclass (#25039)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Asuka Minato
2025-09-06 04:20:13 +09:00
committed by GitHub
parent 917d60a1cb
commit 2b0695bdde
5 changed files with 34 additions and 33 deletions

View File

@@ -98,6 +98,7 @@ class ToolFileManager:
mimetype=mimetype,
name=present_filename,
size=len(file_binary),
original_url=None,
)
session.add(tool_file)
@@ -131,7 +132,6 @@ class ToolFileManager:
filename = f"{unique_name}{extension}"
filepath = f"tools/{tenant_id}/{filename}"
storage.save(filepath, blob)
with Session(self._engine, expire_on_commit=False) as session:
tool_file = ToolFile(
user_id=user_id,