From 094ff86283c2548530a7e9b4c02a3424ac083efd 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 7e0ad25..cf77988 100644 --- a/plugins/tools/daily_note.py +++ b/plugins/tools/daily_note.py @@ -219,6 +219,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) @@ -236,6 +237,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) @@ -302,8 +304,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"]: