feat: Fix missing image
This commit is contained in:
parent
f674680ae5
commit
7d18a85fff
4
main.py
4
main.py
@ -203,6 +203,10 @@ 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:
|
||||||
|
if 'image' not in data:
|
||||||
|
data['image'] = ''
|
||||||
|
|
||||||
|
|
||||||
with open(f'sites/{i["name"]}.json', 'w') as file:
|
with open(f'sites/{i["name"]}.json', 'w') as file:
|
||||||
json.dump(data, file)
|
json.dump(data, file)
|
||||||
|
Loading…
Reference in New Issue
Block a user