aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPinapelz <yukais@pinapelz.com>2025-10-20 23:01:55 -0700
committerPinapelz <yukais@pinapelz.com>2025-10-20 23:01:55 -0700
commit81c4b758b7ee1a34c7233ded857b29d99bedafb3 (patch)
tree8c878a09c9aac57da8881106c6780d91aa47930a
parent7430d0e25dcf17dcc76c9faac00ff22deb84169a (diff)
fix: mainfeed generation crash when image has no article link
-rw-r--r--database.py3
1 files changed, 2 insertions, 1 deletions
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()
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage