diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index cb76258..f48f91d 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -109,6 +109,7 @@ jobs: - name: Install import module database run: | geonature upgrade-modules-db EXPORTS + geonature db upgrade exports@head env: GEONATURE_CONFIG_FILE: dependencies/GeoNature/config/test_config.toml - name: Test with pytest diff --git a/backend/gn_module_export/blueprint.py b/backend/gn_module_export/blueprint.py index be469a5..d3bed13 100644 --- a/backend/gn_module_export/blueprint.py +++ b/backend/gn_module_export/blueprint.py @@ -271,7 +271,7 @@ def get_one_export_api(id_export): user = g.current_user - export = Export.query.get_or_404(id_export) + export = DB.get_or_404(Export, id_export) scope = None if user.is_authenticated: diff --git a/backend/gn_module_export/tests/test_blueprint.py b/backend/gn_module_export/tests/test_blueprint.py index 07ea8f3..c740d43 100644 --- a/backend/gn_module_export/tests/test_blueprint.py +++ b/backend/gn_module_export/tests/test_blueprint.py @@ -6,8 +6,6 @@ from werkzeug.datastructures import Headers from geonature.tests.fixtures import * - -# from geonature.tests.utils import set_logged_user_cookie from pypnusershub.tests.utils import set_logged_user_cookie from .fixtures import *