From 81c4b758b7ee1a34c7233ded857b29d99bedafb3 Mon Sep 17 00:00:00 2001 From: Pinapelz Date: Mon, 20 Oct 2025 23:01:55 -0700 Subject: fix: mainfeed generation crash when image has no article link --- database.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/database.py b/database.py index f23848d..d9af506 100644 --- a/database.py +++ b/database.py @@ -117,9 +117,10 @@ class Database: ), ) for image_entry in news_entry["images"]: + link_url = image_entry.get("link", None) self._cursor.execute( "INSERT OR REPLACE INTO news_images (news_id, image_url, link_url) VALUES (?, ?, ?)", - (key, image_entry["image"], image_entry["link"]), + (key, image_entry["image"], link_url), ) self._conn.commit() -- cgit v1.2.3