Browse Source

fix: remove duplicated code (#24893)

tags/1.8.1
jiangbo721 2 months ago
parent
commit
e048588a88
No account linked to committer's email address
1 changed files with 0 additions and 3 deletions
  1. 0
    3
      api/controllers/console/datasets/datasets_document.py

+ 0
- 3
api/controllers/console/datasets/datasets_document.py View File

@@ -354,9 +354,6 @@ class DatasetInitApi(Resource):
parser.add_argument("embedding_model_provider", type=str, required=False, nullable=True, location="json")
args = parser.parse_args()

# The role of the current user in the ta table must be admin, owner, or editor, or dataset_operator
if not current_user.is_dataset_editor:
raise Forbidden()
knowledge_config = KnowledgeConfig(**args)
if knowledge_config.indexing_technique == "high_quality":
if knowledge_config.embedding_model is None or knowledge_config.embedding_model_provider is None:

Loading…
Cancel
Save