mirror of https://github.com/langgenius/dify.git
fix linter
This commit is contained in:
parent
5e2b0d7b39
commit
b8a29bfb35
|
|
@ -120,4 +120,4 @@ class InvokeRateLimitError(BaseHTTPException):
|
|||
class NeedAddIdsError(BaseHTTPException):
|
||||
error_code = "need_add_ids"
|
||||
description = "Need to add ids."
|
||||
code = 400
|
||||
code = 400
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
return decorator(view)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue