From be38c9e385ecd90a3095649ad2929273e5b2ae47 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 2 Apr 2026 11:37:38 +0800 Subject: [PATCH] fix: update app_shares.is_active and updated_at when deleting shared app --- api/app/services/app_service.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/api/app/services/app_service.py b/api/app/services/app_service.py index 71bebbb0..778aca24 100644 --- a/api/app/services/app_service.py +++ b/api/app/services/app_service.py @@ -758,11 +758,14 @@ class AppService: # 逻辑删除应用 app.is_active = False - # 更新 app_shares 表中该应用的所有共享记录为失效状态 + # 更新 app_shares 表中该应用的所有共享记录为失效状态,并更新 updated_at 时间 stmt = sa_update(AppShare).where( AppShare.source_app_id == app_id, AppShare.is_active.is_(True) - ).values(is_active=False) + ).values( + is_active=False, + updated_at=datetime.datetime.now() + ) self.db.execute(stmt) self.db.commit()