Update JSON config file if it lacks keys
This commit is contained in:
parent
be18a5db41
commit
e920299db4
|
@ -65,6 +65,10 @@ class JSONConfigFile(ConfigFile):
|
|||
|
||||
all_data = await self.default_data()
|
||||
dict_update_recursive(all_data, data)
|
||||
|
||||
if len(data) != len(all_data):
|
||||
await self.write(all_data)
|
||||
|
||||
return all_data
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user