1
0
mirror of https://github.com/aquatix/digimarks.git synced 2025-12-06 22:05:09 +01:00

Show 404 page if bookmark is not found when editing

This commit is contained in:
2017-01-16 11:22:56 +01:00
parent 412b4a93c7
commit 63dd636c25

View File

@@ -376,7 +376,10 @@ def viewbookmarkjson(userkey, urlhash):
def editbookmark(userkey, urlhash):
""" Bookmark edit form """
# bookmark = getbyurlhash()
bookmark = Bookmark.get(Bookmark.url_hash == urlhash, Bookmark.userkey == userkey)
try:
bookmark = Bookmark.get(Bookmark.url_hash == urlhash, Bookmark.userkey == userkey)
except Bookmark.DoesNotExist:
abort(404)
message = request.args.get('message')
tags = get_cached_tags(userkey)
if not bookmark.note: