Fix basedpyright type errors (#25435)
Signed-off-by: -LAN- <laipz8200@outlook.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
2ac7a9c8fc
commit
08dd3f7b50
100 changed files with 847 additions and 497 deletions
|
|
@ -22,6 +22,7 @@ from controllers.console.wraps import (
|
|||
)
|
||||
from fields.file_fields import file_fields, upload_config_fields
|
||||
from libs.login import login_required
|
||||
from models import Account
|
||||
from services.file_service import FileService
|
||||
|
||||
PREVIEW_WORDS_LIMIT = 3000
|
||||
|
|
@ -68,6 +69,8 @@ class FileApi(Resource):
|
|||
source = None
|
||||
|
||||
try:
|
||||
if not isinstance(current_user, Account):
|
||||
raise ValueError("Invalid user account")
|
||||
upload_file = FileService.upload_file(
|
||||
filename=file.filename,
|
||||
content=file.read(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue