fix: Image errors

This commit is contained in:
Nathan Woodburn 2024-02-25 14:15:25 +11:00
parent 8a44d48441
commit 93a3e95380
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1

View File

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