From b8a29bfb358bdeefe2c7cd25622231a47a111c48 Mon Sep 17 00:00:00 2001 From: Yansong Zhang <916125788@qq.com> Date: Tue, 14 Oct 2025 11:39:56 +0800 Subject: [PATCH] fix linter --- api/controllers/console/app/error.py | 2 +- api/controllers/console/app/wraps.py | 8 ++------ api/controllers/console/explore/trial.py | 2 +- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/api/controllers/console/app/error.py b/api/controllers/console/app/error.py index 46185c007b..6b4bd6755a 100644 --- a/api/controllers/console/app/error.py +++ b/api/controllers/console/app/error.py @@ -120,4 +120,4 @@ class InvokeRateLimitError(BaseHTTPException): class NeedAddIdsError(BaseHTTPException): error_code = "need_add_ids" description = "Need to add ids." - code = 400 \ No newline at end of file + code = 400 diff --git a/api/controllers/console/app/wraps.py b/api/controllers/console/app/wraps.py index 01f41d6222..2f0e16ac79 100644 --- a/api/controllers/console/app/wraps.py +++ b/api/controllers/console/app/wraps.py @@ -25,11 +25,7 @@ def _load_app_model(app_id: str) -> App | None: def _load_app_model_with_trial(app_id: str) -> App | None: assert isinstance(current_user, Account) - app_model = ( - db.session.query(App) - .where(App.id == app_id, App.status == "normal") - .first() - ) + app_model = db.session.query(App).where(App.id == app_id, App.status == "normal").first() return app_model @@ -112,4 +108,4 @@ def get_app_model_with_trial(view: Callable[P, R] | None = None, *, mode: Union[ if view is None: return decorator else: - return decorator(view) \ No newline at end of file + return decorator(view) diff --git a/api/controllers/console/explore/trial.py b/api/controllers/console/explore/trial.py index 592b770664..eb3c22cd0c 100644 --- a/api/controllers/console/explore/trial.py +++ b/api/controllers/console/explore/trial.py @@ -475,7 +475,7 @@ class DatasetListApi(Resource): page = request.args.get("page", default=1, type=int) limit = request.args.get("limit", default=20, type=int) ids = request.args.getlist("ids") - + tenant_id = app_model.tenant_id if ids: datasets, total = DatasetService.get_datasets_by_ids(ids, tenant_id)