From c3f466cd30ad2627bc3d1d7f05253e6d14794a47 Mon Sep 17 00:00:00 2001 From: xtaodada Date: Sun, 18 Feb 2024 14:41:29 +0800 Subject: [PATCH] :bug: Fix daily note tasks update status --- plugins/tools/daily_note.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/tools/daily_note.py b/plugins/tools/daily_note.py index dbf0f1d9..0a180d08 100644 --- a/plugins/tools/daily_note.py +++ b/plugins/tools/daily_note.py @@ -266,6 +266,7 @@ class DailyNoteSystem(Plugin): else: user.resin.notice_num = web_config.resin.notice_num user.resin.noticed = False + user.resin_db.status = TaskStatusEnum.STATUS_SUCCESS else: if user.resin_db: await self.resin_service.remove(user.resin_db) @@ -301,6 +302,7 @@ class DailyNoteSystem(Plugin): await self.expedition_service.add(expedition) else: user.expedition.noticed = False + user.expedition_db.status = TaskStatusEnum.STATUS_SUCCESS else: if user.expedition_db: await self.expedition_service.remove(user.expedition_db) @@ -367,8 +369,6 @@ class DailyNoteSystem(Plugin): except Exception as exc: logger.error("执行自动便签提醒时发生错误 user_id[%s]", user_id, exc_info=exc) continue - else: - task_user_db.status = TaskStatusEnum.STATUS_SUCCESS await self.update_task_user(task_db) async def get_migrate_data(self, old_user_id: int, new_user_id: int, _) -> Optional["TaskMigrate"]: