mirror of
http://112.124.100.131/huang.ze/ebiz-dify-ai.git
synced 2025-12-09 02:46:52 +08:00
fix: app_count of dataset is error when apps was deleted (#4810)
This commit is contained in:
@@ -76,7 +76,8 @@ class Dataset(db.Model):
|
||||
|
||||
@property
|
||||
def app_count(self):
|
||||
return db.session.query(func.count(AppDatasetJoin.id)).filter(AppDatasetJoin.dataset_id == self.id).scalar()
|
||||
return db.session.query(func.count(AppDatasetJoin.id)).filter(AppDatasetJoin.dataset_id == self.id,
|
||||
App.id == AppDatasetJoin.app_id).scalar()
|
||||
|
||||
@property
|
||||
def document_count(self):
|
||||
|
||||
Reference in New Issue
Block a user