From 6ec4a093c2c8527bd256963727c8b3bfeddcb9cd Mon Sep 17 00:00:00 2001 From: Harry Date: Thu, 22 Jan 2026 22:46:45 +0800 Subject: [PATCH] fix(app_asset_service): correct parameter passing in get_or_create_assets method and remove unused method for published assets --- api/services/app_asset_service.py | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/api/services/app_asset_service.py b/api/services/app_asset_service.py index 0bf20b8d42..da6f93b49c 100644 --- a/api/services/app_asset_service.py +++ b/api/services/app_asset_service.py @@ -398,7 +398,7 @@ class AppAssetService: after_node_id: str | None, ) -> AppAssetNode: with Session(db.engine, expire_on_commit=False) as session: - assets = AppAssetService.get_or_create_assets(session, app_model, account_id) + assets = AppAssetService.get_or_create_assets(session, app_model, account_id=account_id) tree = assets.asset_tree try: @@ -513,19 +513,6 @@ class AppAssetService: presign_storage = FilePresignStorage(storage.storage_runner) return presign_storage.get_download_url(storage_key, expires_in) - @staticmethod - def get_published_assets_by_workflow_id(tenant_id: str, app_id: str, workflow_id: str) -> AppAssets | None: - with Session(db.engine, expire_on_commit=False) as session: - return ( - session.query(AppAssets) - .filter( - AppAssets.tenant_id == tenant_id, - AppAssets.app_id == app_id, - AppAssets.version == workflow_id, - ) - .first() - ) - @staticmethod def get_source_zip_bytes(tenant_id: str, app_id: str, workflow_id: str) -> bytes | None: source_zip_key = AssetPaths.build_source_zip(tenant_id, app_id, workflow_id)