diff --git a/rifaserver/app.py b/rifaserver/app.py index 8e0d5eb..2794fb6 100644 --- a/rifaserver/app.py +++ b/rifaserver/app.py @@ -68,6 +68,7 @@ def create_app(): app.config['SECRET_KEY'] = secrets.token_hex() print(f"Using generated key {app.config['SECRET_KEY']}") _config['SECRET_KEY'] = app.config['SECRET_KEY'] + os.makedirs(app.instance_path, exist_ok=True) with open(config_filename, 'w') as f: json.dump(_config, f) db.init_app(app)