mirror of https://github.com/langgenius/dify.git
fix: session of db
This commit is contained in:
parent
65d376bdae
commit
0e1444d17c
|
|
@ -1,5 +1,3 @@
|
|||
from sqlalchemy.orm import Session
|
||||
|
||||
from configs import dify_config
|
||||
from extensions.ext_database import db
|
||||
from models.model import AccountTrialAppRecord, TrialApp
|
||||
|
|
@ -62,7 +60,7 @@ class RecommendedAppService:
|
|||
:param app_id: app id
|
||||
:return:
|
||||
"""
|
||||
with Session(db.engine) as session:
|
||||
with db.session as session:
|
||||
account_trial_app_record = session.query(AccountTrialAppRecord).where(
|
||||
AccountTrialAppRecord.app_id == app_id,
|
||||
AccountTrialAppRecord.account_id == account_id
|
||||
|
|
|
|||
Loading…
Reference in New Issue