fix: replace all dataset.Model.query to db.session.query(Model) (#19509)

This commit is contained in:
非法操作 2025-05-12 13:52:33 +08:00 • committed by GitHub
commit b00f94df64
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 430 additions and 265 deletions

View file

@ -24,7 +24,7 @@ def deal_dataset_vector_index_task(dataset_id: str, action: str):
start_at = time.perf_counter()
try:
dataset = Dataset.query.filter_by(id=dataset_id).first()
dataset = db.session.query(Dataset).filter_by(id=dataset_id).first()
if not dataset:
raise Exception("Dataset not found")