Fix upload_asset to handle Form objects for project_id parameter

This commit is contained in:
DJP 2025-12-10 23:18:46 -05:00
parent 34f00d9f00
commit 7087dc6a23

View file

@ -274,7 +274,7 @@ async def upload_asset(
asset = Asset(
id=asset_id,
user_id=user.id if user else None,
project_id=UUID(project_id) if project_id else None,
project_id=UUID(project_id) if (project_id and isinstance(project_id, str)) else None,
original_filename=file.filename,
stored_filename=stored_filename,
file_path=file_path,