From 72f971162d18c5d8cca8e60683e501b023bab159 Mon Sep 17 00:00:00 2001 From: Domeniko Gentner Date: Fri, 15 Jan 2021 20:02:52 +0100 Subject: [PATCH] corrected path for upgrade --- labertasche/blueprints/bp_upgrades/db_v2.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/labertasche/blueprints/bp_upgrades/db_v2.py b/labertasche/blueprints/bp_upgrades/db_v2.py index db052c2..163e65e 100644 --- a/labertasche/blueprints/bp_upgrades/db_v2.py +++ b/labertasche/blueprints/bp_upgrades/db_v2.py @@ -9,7 +9,7 @@ from . import bp_dbupgrades from flask_cors import cross_origin from flask_login import login_required -from flask import render_template, jsonify, make_response, redirect, url_for +from flask import render_template, jsonify, make_response, redirect, url_for, current_app from pathlib import Path from labertasche.database import labertasche_db as db from labertasche.models import TProjects, TComments, TLocation, TEmail, TVersion @@ -22,7 +22,8 @@ from datetime import datetime def get_backup_folder() -> Path: - path = Path('.').absolute() / "backup" / "v1" + path = Path(current_app.root_path) + path = path / "backup" / "v1" return path