Fix for project-less files

This commit is contained in:
Sybren A. Stüvel 2018-01-26 10:45:11 +01:00
parent 741cdf6e12
commit 9b3a836c83

View File

@ -43,10 +43,15 @@ def _handle_picture(node: dict, to_index: dict):
if item['size'] != 't': if item['size'] != 't':
continue continue
link = generate_link(picture['backend'], # Not all files have a project...
item['file_path'], pid = picture.get('project')
str(picture['project']), if pid:
is_public=True) link = generate_link(picture['backend'],
item['file_path'],
str(pid),
is_public=True)
else:
link = item['link']
to_index['picture'] = link to_index['picture'] = link
break break