From 56927d422419de25387e2d8b7416765c0e6e9f98 Mon Sep 17 00:00:00 2001 From: Kyle Mahan Date: Sun, 28 May 2017 12:08:21 -0700 Subject: [PATCH] limit author properties to the SQL column widths --- woodwind/tasks.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/woodwind/tasks.py b/woodwind/tasks.py index fdaeaa5..ae4911d 100644 --- a/woodwind/tasks.py +++ b/woodwind/tasks.py @@ -526,6 +526,13 @@ def hentry_to_entry(hentry, feed, backfill, now): author_photo = author.get('photo') author_url = author.get('url') + if author_name and len(author_name) > Entry.author_name.property.columns[0].type.length: + author_name = None + if author_photo and len(author_photo) > Entry.author_photo.property.columns[0].type.length: + author_photo = None + if author_url and len(author_url) > Entry.author_url.property.columns[0].type.length: + author_url = None + entry = Entry( uid=uid, retrieved=retrieved,