fix bug for fasetembed (#392)

### What problem does this PR solve?

Issue link:#325

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
KevinHuSh
2024-04-16 19:12:12 +08:00
committed by GitHub
parent ad6f0a1ce5
commit 03f8b01b3b
2 changed files with 7 additions and 2 deletions

View File

@ -58,7 +58,7 @@ def upload():
if not e:
return get_data_error_result(
retmsg="Can't find this knowledgebase!")
if DocumentService.get_doc_count(kb.tenant_id) >= os.environ.get('MAX_FILE_NUM_PER_USER', 8192):
if DocumentService.get_doc_count(kb.tenant_id) >= int(os.environ.get('MAX_FILE_NUM_PER_USER', 8192)):
return get_data_error_result(
retmsg="Exceed the maximum file number of a free user!")