feat: Fix missing image

This commit is contained in:
Nathan Woodburn 2024-02-24 21:48:14 +11:00
parent f674680ae5
commit 7d18a85fff
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1

View File

@ -203,6 +203,10 @@ def site_post():
file.save(f'avatars/{i["name"]}.' + extension)
data['image'] = f'{i["name"]}.' + extension
else:
if 'image' not in data:
data['image'] = ''
with open(f'sites/{i["name"]}.json', 'w') as file:
json.dump(data, file)