mirror of
https://github.com/langgenius/dify.git
synced 2026-04-29 12:37:20 +08:00
fix linter
This commit is contained in:
parent
0e60b30d23
commit
8090342f60
@ -120,4 +120,4 @@ class InvokeRateLimitError(BaseHTTPException):
|
|||||||
class NeedAddIdsError(BaseHTTPException):
|
class NeedAddIdsError(BaseHTTPException):
|
||||||
error_code = "need_add_ids"
|
error_code = "need_add_ids"
|
||||||
description = "Need to add ids."
|
description = "Need to add ids."
|
||||||
code = 400
|
code = 400
|
||||||
|
|||||||
@ -24,11 +24,7 @@ def _load_app_model(app_id: str) -> App | None:
|
|||||||
|
|
||||||
def _load_app_model_with_trial(app_id: str) -> App | None:
|
def _load_app_model_with_trial(app_id: str) -> App | None:
|
||||||
assert isinstance(current_user, Account)
|
assert isinstance(current_user, Account)
|
||||||
app_model = (
|
app_model = db.session.query(App).where(App.id == app_id, App.status == "normal").first()
|
||||||
db.session.query(App)
|
|
||||||
.where(App.id == app_id, App.status == "normal")
|
|
||||||
.first()
|
|
||||||
)
|
|
||||||
return app_model
|
return app_model
|
||||||
|
|
||||||
|
|
||||||
@ -111,4 +107,4 @@ def get_app_model_with_trial(view: Callable[P, R] | None = None, *, mode: Union[
|
|||||||
if view is None:
|
if view is None:
|
||||||
return decorator
|
return decorator
|
||||||
else:
|
else:
|
||||||
return decorator(view)
|
return decorator(view)
|
||||||
|
|||||||
@ -475,7 +475,7 @@ class DatasetListApi(Resource):
|
|||||||
page = request.args.get("page", default=1, type=int)
|
page = request.args.get("page", default=1, type=int)
|
||||||
limit = request.args.get("limit", default=20, type=int)
|
limit = request.args.get("limit", default=20, type=int)
|
||||||
ids = request.args.getlist("ids")
|
ids = request.args.getlist("ids")
|
||||||
|
|
||||||
tenant_id = app_model.tenant_id
|
tenant_id = app_model.tenant_id
|
||||||
if ids:
|
if ids:
|
||||||
datasets, total = DatasetService.get_datasets_by_ids(ids, tenant_id)
|
datasets, total = DatasetService.get_datasets_by_ids(ids, tenant_id)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user