From dbcb93eabb876febcb2cd7d4c5388065743d3938 Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Wed, 29 Oct 2025 08:29:20 -0700 Subject: [PATCH] =?UTF-8?q?refactor=20Alerts=20=F0=9F=9A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/checklist.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/checklist.py b/modules/checklist.py index 5890105..eb2c847 100644 --- a/modules/checklist.py +++ b/modules/checklist.py @@ -254,6 +254,8 @@ def get_overdue_checkins(): return [] def format_overdue_alert(): + header = "⚠️ OVERDUE CHECK-INS:\n" + alert = '' try: """Format overdue check-ins as an alert message""" overdue = get_overdue_checkins() @@ -261,8 +263,6 @@ def format_overdue_alert(): logger.debug(f"Overdue check-ins: {overdue}") if not overdue: return None - - alert = "⚠️ OVERDUE CHECK-INS:\n" for entry in overdue: hours = entry['overdue_minutes'] // 60 minutes = entry['overdue_minutes'] % 60 @@ -275,8 +275,8 @@ def format_overdue_alert(): if entry['checkin_notes']: alert += f" 📝{entry['checkin_notes']}" alert += "\n" - - return alert.rstrip() + if alert: + return header + alert.rstrip() except Exception as e: logger.error(f"Checklist: Error formatting overdue alert: {e}") return None