1
0
mirror of https://github.com/aquatix/digimarks.git synced 2025-12-06 20:55:10 +01:00

Catch case where favicon property is empty

This commit is contained in:
2018-03-23 13:11:06 +01:00
parent 0548f35b39
commit fac3a4f747

View File

@@ -958,8 +958,7 @@ def findmissingfavicons(systemkey):
bookmarks = Bookmark.select()
for bookmark in bookmarks:
try:
filename = os.path.join(MEDIA_ROOT, 'favicons/' + bookmark.favicon)
if not os.path.isfile(filename):
if not bookmark.favicon or not os.path.isfile(os.path.join(MEDIA_ROOT, 'favicons/' + bookmark.favicon)):
# This favicon is missing
bookmark.set_favicon()
except OSError as e: