From e65232761b61b0d728519be39940e9207583676e Mon Sep 17 00:00:00 2001 From: giles Date: Fri, 27 Feb 2026 23:31:00 +0000 Subject: [PATCH] Fix NoneType strftime error in events calendar grid MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Guard day_date.strftime() call with None check — day_cell.date can be None for empty grid cells. Co-Authored-By: Claude Opus 4.6 --- events/sexp_components.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/events/sexp_components.py b/events/sexp_components.py index 0f45ef7..c14fad8 100644 --- a/events/sexp_components.py +++ b/events/sexp_components.py @@ -559,7 +559,8 @@ def _calendar_main_panel_html(ctx: dict) -> str: parts.append(f'
') parts.append('
') - parts.append(f'{day_date.strftime("%a")}') + if day_date: + parts.append(f'{day_date.strftime("%a")}') # Clickable day number if day_date: