corrected path for upgrade

main
Domeniko Gentner 4 years ago
parent 7125cc0719
commit e9b82016f3
  1. 5
      labertasche/blueprints/bp_upgrades/db_v2.py

@ -136,8 +136,9 @@ def upgrade_db_to_v2_export():
if compare_digest(db_uri[0:6], "sqlite"): if compare_digest(db_uri[0:6], "sqlite"):
m = search("([/]{3})(.*)", db_uri) m = search("([/]{3})(.*)", db_uri)
new_db = get_backup_folder() / "labertasche.db" new_db = get_backup_folder() / "labertasche.db"
old_db = Path(m.group(2)).absolute() old_db = Path(current_app.root_path)
copy(old_db, new_db) old_db = old_db / m.group(2)
copy(old_db.absolute(), new_db)
except Exception as e: except Exception as e:
return make_response(jsonify(status='exception-copy-db', msg=str(e)), 400) return make_response(jsonify(status='exception-copy-db', msg=str(e)), 400)

Loading…
Cancel
Save