Fix for project-less files
This commit is contained in:
parent
741cdf6e12
commit
9b3a836c83
@ -43,10 +43,15 @@ def _handle_picture(node: dict, to_index: dict):
|
|||||||
if item['size'] != 't':
|
if item['size'] != 't':
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
# Not all files have a project...
|
||||||
|
pid = picture.get('project')
|
||||||
|
if pid:
|
||||||
link = generate_link(picture['backend'],
|
link = generate_link(picture['backend'],
|
||||||
item['file_path'],
|
item['file_path'],
|
||||||
str(picture['project']),
|
str(pid),
|
||||||
is_public=True)
|
is_public=True)
|
||||||
|
else:
|
||||||
|
link = item['link']
|
||||||
to_index['picture'] = link
|
to_index['picture'] = link
|
||||||
break
|
break
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user