From a8a704424af33b4bffe3de80a04ef25f360c6b69 Mon Sep 17 00:00:00 2001 From: James Ravenscroft Date: Mon, 2 Dec 2024 14:44:53 +0000 Subject: [PATCH] implement alt check --- src/microcosm/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/microcosm/__init__.py b/src/microcosm/__init__.py index d9d2643..30997dd 100644 --- a/src/microcosm/__init__.py +++ b/src/microcosm/__init__.py @@ -345,7 +345,10 @@ def process_multipart_post(): frontmatter["thumbnail"] = photo_url if "mp-photo-alt[]" in request.form: - alt = request.form["mp-photo-alt[]"][i] + try: + alt = request.form["mp-photo-alt[]"][i] + except: + alt = "" else: alt = ""