From 65d376bdaef74838a24e85fd2cb0c95cba4eda16 Mon Sep 17 00:00:00 2001 From: Yansong Zhang <916125788@qq.com> Date: Sat, 11 Oct 2025 09:26:24 +0800 Subject: [PATCH] fix trial where condition --- api/services/recommended_app_service.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/api/services/recommended_app_service.py b/api/services/recommended_app_service.py index b0c31e272b..1bc24c5afe 100644 --- a/api/services/recommended_app_service.py +++ b/api/services/recommended_app_service.py @@ -63,7 +63,10 @@ class RecommendedAppService: :return: """ with Session(db.engine) as session: - account_trial_app_record = session.query(AccountTrialAppRecord).where(TrialApp.app_id == app_id).first() + account_trial_app_record = session.query(AccountTrialAppRecord).where( + AccountTrialAppRecord.app_id == app_id, + AccountTrialAppRecord.account_id == account_id + ).first() if account_trial_app_record: account_trial_app_record.count += 1 session.commit()