dev@locazia: fix config file does not exist
This commit is contained in:
parent
c2ec577f2d
commit
5e631d39d8
|
|
@ -1,4 +1,9 @@
|
||||||
from app.core.models._config import ConfigFile
|
from app.core.models._config import ConfigFile
|
||||||
from app.core._config import CONFIG_FILE
|
from app.core._config import CONFIG_FILE
|
||||||
|
import os
|
||||||
|
|
||||||
|
if not os.path.exists(CONFIG_FILE):
|
||||||
|
with open(CONFIG_FILE, 'w') as f:
|
||||||
|
f.write('{}')
|
||||||
|
|
||||||
active_config = ConfigFile(CONFIG_FILE)
|
active_config = ConfigFile(CONFIG_FILE)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue