From b12974fc31877e33714c392e33acd81dd0c81409 Mon Sep 17 00:00:00 2001 From: Michiel Scholten Date: Tue, 16 Aug 2016 21:29:01 +0200 Subject: [PATCH] Workaround for when an existing bookmark has a null note --- digimarks.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/digimarks.py b/digimarks.py index 07e4080..1166927 100644 --- a/digimarks.py +++ b/digimarks.py @@ -325,6 +325,9 @@ def editbookmark(userkey, urlhash): bookmark = Bookmark.get(Bookmark.url_hash == urlhash, Bookmark.userkey == userkey) message = request.args.get('message') tags = get_cached_tags(userkey) + if not bookmark.note: + # Workaround for when an existing bookmark has a null note + bookmark.note = '' return render_template('edit.html', action='Edit bookmark', userkey=userkey, bookmark=bookmark, message=message, formaction='edit', tags=tags)